Skip to content

Commit

Permalink
fix(eslint): Fix eslint to recognize sub packages
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-martin committed Oct 16, 2020
1 parent d8b6ee5 commit 13fdd2b
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/dist
**/node_modules
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
module.exports = {
root: true,
env: {
node: true,
jest: true,
},

parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.build.json',
sourceType: 'module',
project: ['./packages/*/tsconfig.json', './examples/tsconfig.json'],
tsconfigRootDir: __dirname,

},
plugins: ['@typescript-eslint', 'prettier', 'import', 'jest', 'eslint-plugin-tsdoc'],
extends: [
Expand Down
3 changes: 0 additions & 3 deletions examples/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
module.exports = {
parserOptions: {
project: './tsconfig.build.json',
},
rules: {
'jest/expect-expect': ['error', { assertFunctionNames: ['expect', 'request.**.expect'] }],
},
Expand Down
4 changes: 2 additions & 2 deletions examples/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"include": [
"./helpers",
"**/src",
"**/e2e",
"**/ormconfig.json"
],
"exclude": [
"node_modules",
"dist",
"**/*spec.ts"
"dist"
]
}
5 changes: 1 addition & 4 deletions packages/core/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
module.exports = {
parserOptions: {
project: "./tsconfig.build.json"
},
};
};
4 changes: 4 additions & 0 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"outDir": "./dist",
"rootDir": "."
},
"include": [
"./src",
"./__tests__"
],
"exclude": [
"node_modules",
"dist"
Expand Down
3 changes: 0 additions & 3 deletions packages/query-graphql/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
module.exports = {
parserOptions: {
project: './tsconfig.build.json',
},
rules: {
'jest/expect-expect': [
'error',
Expand Down
4 changes: 2 additions & 2 deletions packages/query-graphql/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"rootDir": "."
},
"include": [
"src",
"__tests__"
"./src",
"./__tests__"
],
"exclude": [
"node_modules",
Expand Down
3 changes: 0 additions & 3 deletions packages/query-mongoose/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
module.exports = {
parserOptions: {
project: './tsconfig.build.json',
},
rules: {
'jest/expect-expect': [
'error',
Expand Down
4 changes: 4 additions & 0 deletions packages/query-mongoose/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"outDir": "./dist",
"rootDir": "."
},
"include": [
"./src",
"./__tests__"
],
"exclude": [
"node_modules",
"dist"
Expand Down
3 changes: 0 additions & 3 deletions packages/query-sequelize/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
module.exports = {
parserOptions: {
project: "./tsconfig.build.json"
},
rules: {
"jest/expect-expect": [
"error",
Expand Down
4 changes: 4 additions & 0 deletions packages/query-sequelize/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"outDir": "./dist",
"rootDir": "."
},
"include": [
"./src",
"./__tests__"
],
"exclude": [
"node_modules",
"dist"
Expand Down
3 changes: 0 additions & 3 deletions packages/query-typeorm/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
module.exports = {
parserOptions: {
project: './tsconfig.build.json',
},
rules: {
'jest/expect-expect': [
'error',
Expand Down
4 changes: 4 additions & 0 deletions packages/query-typeorm/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"outDir": "./dist",
"rootDir": "."
},
"include": [
"./src",
"./__tests__"
],
"exclude": [
"node_modules",
"dist"
Expand Down

0 comments on commit 13fdd2b

Please sign in to comment.