Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
module.exports = {
root: true,
extends: ['@viamrobotics/eslint-config'],
env: {
node: true,
},
parserOptions: {
project: ['./tsconfig.json', './packages/*/tsconfig.json'],
},
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
pnpm-publish-summary.json
*.d.cts
*.tgz
15 changes: 13 additions & 2 deletions packages/eslint-config/base.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ module.exports = {
'no-constructor-return': 'error',
'no-debugger': 'warn',
'no-div-regex': 'error',
'no-duplicate-imports': 'error',
'no-else-return': 'error',
'no-empty-static-block': 'error',
'no-eval': 'error',
Expand Down Expand Up @@ -110,7 +109,6 @@ module.exports = {
'no-unmodified-loop-condition': 'error',
'no-unused-expressions': 'error',
'no-unused-private-class-members': 'error',
'no-use-before-define': 'error',
'no-useless-call': 'error',
'no-useless-computed-key': 'error',
'no-useless-concat': 'error',
Expand Down Expand Up @@ -154,6 +152,16 @@ module.exports = {
'@typescript-eslint/return-await': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-use-before-define': [
'warn',
{
functions: false,
classes: false,
variables: false,
allowNamedExports: true,
ignoreTypeReferences: true,
},
],

// Extra import rules
'import/no-absolute-path': 'error',
Expand All @@ -178,6 +186,9 @@ module.exports = {
parserOptions: {
sourceType: 'script',
},
env: {
commonjs: true,
},
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
Expand Down
6 changes: 5 additions & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
"publishConfig": {
"access": "public"
},
"version": "0.0.1",
"version": "0.0.2",
"description": "Common ESLint configuration for Viam projects.",
"files": [
"**/*",
"!tsconfig.json"
],
"types": "./base.d.cts",
"exports": {
".": {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@viamrobotics/typescript-config",
"extends": "@viamrobotics/typescript-config/base.json",
"compilerOptions": {
"types": ["node"],
"declaration": true,
Expand Down
4 changes: 4 additions & 0 deletions packages/prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
},
"version": "0.0.1",
"description": "Common Prettier configuration for Viam projects.",
"files": [
"**/*",
"!tsconfig.json"
],
"types": "./base.d.cts",
"exports": {
".": {
Expand Down
2 changes: 1 addition & 1 deletion packages/prettier-config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@viamrobotics/typescript-config",
"extends": "@viamrobotics/typescript-config/base.json",
"compilerOptions": {
"types": ["node"],
"declaration": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Use the [base config](./tsconfig.base.json) for generic TypeScript projects, inc
```json
// tsconfig.json
{
"extends": "@viamrobotics/typescript-config"
"extends": "@viamrobotics/typescript-config/base.json"
}
```
9 changes: 5 additions & 4 deletions packages/typescript-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
"publishConfig": {
"access": "public"
},
"version": "0.0.1",
"version": "0.0.2",
"description": "Common TypeScript configuration for Viam projects.",
"exports": {
".": "./tsconfig.base.json"
},
"files": [
"**/*",
"!tsconfig.json"
],
"repository": {
"type": "git",
"url": "git+https://github.com/viamrobotics/js-config.git",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@viamrobotics/typescript-config",
"extends": "@viamrobotics/typescript-config/base.json",
"compilerOptions": {
"types": ["node"],
"noEmit": true
Expand Down