Skip to content

Commit d1114d2

Browse files
committed
chore: ts-check and lint eslintrc
Config as code for a reason, eh?
1 parent 87c9be1 commit d1114d2

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.eslintrc.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// @ts-check
12
// TODO(@lishaduck) [eslint@>9.5]: Use `.ts` extension to get more type checking for this file.
23
// TODO(@lishaduck) [engine:node@>=18]: Upgrade `tseslint`.
34
// TODO(@lishaduck) [engine:node@>=18]: Use `eslint-define-config` to get type checking for this file.
@@ -32,7 +33,6 @@ module.exports = {
3233
'test/snapshots',
3334
'test/temporary',
3435
'vendor/',
35-
'.eslintrc.js',
3636
'new-package/elm-review-package-tests/check-previews-compile.js'
3737
],
3838
rules: {
@@ -114,6 +114,13 @@ module.exports = {
114114
'n/no-process-exit': 'off',
115115
'@typescript-eslint/unbound-method': 'off' // TODO(@lishaduck): Fix this warning. I just got confused.
116116
}
117+
},
118+
{
119+
files: ['.eslintrc.js'],
120+
rules: {
121+
camelcase: 'off',
122+
'@typescript-eslint/prefer-nullish-coalescing': 'off' // It's not happy with how TS is set up on this config file.
123+
}
117124
}
118125
],
119126
globals: {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"check-engines": "ls-engines --mode=ideal",
4848
"elm-format": "elm-format --validate ast-codec init-templates new-package parseElm review template",
4949
"elm-tests": "(cd template/ && elm make src/Elm/Review/Main.elm --output=/dev/null && elm-test)",
50-
"eslint-check": "eslint . --report-unused-disable-directives --max-warnings=2",
50+
"eslint-check": "eslint . --report-unused-disable-directives --max-warnings=7",
5151
"eslint-fix": "npm run eslint-check -- --fix",
5252
"jest": "npx jest",
5353
"prepare": "elm-tooling install",

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"exclude": [
3232
"node_modules",
3333
"**/elm-stuff/",
34-
".eslintrc.js",
3534
"new-package/elm-review-package-tests/check-previews-compile.js",
3635
"test/temporary"
3736
]

0 commit comments

Comments
 (0)