Skip to content

Commit

Permalink
refactor(ESLint): enforce import related eslint rules across monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
diehbria committed Mar 20, 2023
1 parent ddac5b2 commit 843c54d
Show file tree
Hide file tree
Showing 22 changed files with 234 additions and 83 deletions.
11 changes: 7 additions & 4 deletions configuration/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,21 @@ module.exports = {
node: true,
},
ignorePatterns: [
'cypress',
'stencil.config.ts',
'configuration',
'__mocks__',
'packages/scene-composer/src/three/tiles3d/*',
'examples/**/*',
],
extends: [
'turbo',
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:chai-friendly/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
],
plugins: ['prettier', 'chai-friendly', 'react', 'jest', 'import'],
plugins: ['prettier', 'react', 'jest', 'import'],
globals: {
module: true,
process: true,
Expand All @@ -37,6 +36,10 @@ module.exports = {
react: {
pragma: 'h',
},
'import/resolver': {
typescript: true,
node: true,
},
},
rules: {
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
Expand Down
7 changes: 4 additions & 3 deletions configuration/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "8.3.0",
"eslint-config-turbo": "latest",
"eslint-plugin-chai-friendly": "0.7.2",
"eslint-plugin-cypress": "2.12.1",
"eslint-plugin-formatjs": "3.0.0",
"eslint-plugin-import": "2.25.2",
"eslint-plugin-jest": "^26.6.0",
Expand All @@ -25,5 +23,8 @@
},
"files": [
"index.js"
]
],
"devDependencies": {
"eslint-import-resolver-typescript": "^3.5.3"
}
}
230 changes: 187 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 843c54d

Please sign in to comment.