Skip to content

Commit df6c1d6

Browse files
committed
chore: eslintrc files cannot be linted if they are not part of the project
- Problem occurs only when comitting an .eslintrc file (yarn lint-staged step). File .eslintrc.js is linted but according to tsconfig it is not part of the project. - Solution is to include it in the project as a separate tsconfig.eslint.json file. - This commit is done with '--no-verify' to allow separating this change from fixing the actual lint issue in these files (e.g. double quotes instead of single quotes) - Relevant StackOverflow discussion: stackoverflow.com/questions/63118405/how-to-fix-eslintrc-the-file-does-not-match-your-project-config
1 parent 6878456 commit df6c1d6

File tree

13 files changed

+17
-12
lines changed

13 files changed

+17
-12
lines changed

packages/blockfrost/test/.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
"extends": ["../../../test/.eslintrc.js"],
33
"parserOptions": {
4-
"project": "./tsconfig.json",
4+
"project": [ "./tsconfig.json", "../../../tsconfig.eslint.json"] ,
55
"tsconfigRootDir": __dirname
66
}
77
}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
"extends": ["../../../test/.eslintrc.js"],
33
"parserOptions": {
4-
"project": "./tsconfig.json",
4+
"project": [ "./tsconfig.json", "../../../tsconfig.eslint.json"],
55
"tsconfigRootDir": __dirname
66
}
77
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
"extends": ["../../../test/.eslintrc.js"],
33
"parserOptions": {
4-
"project": "./tsconfig.json",
4+
"project": [ "./tsconfig.json", "../../../tsconfig.eslint.json"],
55
"tsconfigRootDir": __dirname
66
}
77
}

packages/cip2/test/.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
"extends": ["../../../test/.eslintrc.js"],
33
"parserOptions": {
4-
"project": "./tsconfig.json",
4+
"project": [ "./tsconfig.json", "../../../tsconfig.eslint.json"],
55
"tsconfigRootDir": __dirname
66
}
77
}

packages/cip30/test/.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
"extends": ["../../../test/.eslintrc.js"],
33
"parserOptions": {
4-
"project": "./tsconfig.json",
4+
"project": [ "./tsconfig.json", "../../../tsconfig.eslint.json"],
55
"tsconfigRootDir": __dirname
66
}
77
}

packages/core/test/.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
"extends": ["../../../test/.eslintrc.js"],
33
"parserOptions": {
4-
"project": "./tsconfig.json",
4+
"project": [ "./tsconfig.json", "../../../tsconfig.eslint.json"] ,
55
"tsconfigRootDir": __dirname
66
}
77
}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
"extends": ["../../../test/.eslintrc.js"],
33
"parserOptions": {
4-
"project": "./tsconfig.json",
4+
"project": [ "./tsconfig.json", "../../../tsconfig.eslint.json"],
55
"tsconfigRootDir": __dirname
66
}
77
}

packages/ogmios/test/.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
"extends": ["../../../test/.eslintrc.js"],
33
"parserOptions": {
4-
"project": "./tsconfig.json",
4+
"project": [ "./tsconfig.json", "../../../tsconfig.eslint.json"],
55
"tsconfigRootDir": __dirname
66
}
77
}

packages/util-dev/test/.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
"extends": ["../../../test/.eslintrc.js"],
33
"parserOptions": {
4-
"project": "./tsconfig.json",
4+
"project": [ "./tsconfig.json", "../../../tsconfig.eslint.json"],
55
"tsconfigRootDir": __dirname
66
}
77
}

packages/wallet/test/.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
"extends": ["../../../test/.eslintrc.js"],
33
"parserOptions": {
4-
"project": "./tsconfig.json",
4+
"project": [ "./tsconfig.json", "../../../tsconfig.eslint.json"],
55
"tsconfigRootDir": __dirname
66
}
77
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
"extends": ["../../../test/.eslintrc.js"],
33
"parserOptions": {
4-
"project": "./tsconfig.json",
4+
"project": [ "./tsconfig.json", "../../../tsconfig.eslint.json"],
55
"tsconfigRootDir": __dirname
66
}
77
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
"extends": ["../../../test/.eslintrc.js"],
33
"parserOptions": {
4-
"project": "./tsconfig.json",
4+
"project": [ "./tsconfig.json", "../../../tsconfig.eslint.json"],
55
"tsconfigRootDir": __dirname
66
}
77
}

tsconfig.eslint.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"include": [
3+
"packages/**/.eslintrc.js"
4+
]
5+
}

0 commit comments

Comments
 (0)