Skip to content

Commit

Permalink
chore: ts-check and lint eslintrc
Browse files Browse the repository at this point in the history
Config as code for a reason, eh?
  • Loading branch information
lishaduck committed Jul 8, 2024
1 parent 87c9be1 commit d1114d2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-check
// TODO(@lishaduck) [eslint@>9.5]: Use `.ts` extension to get more type checking for this file.
// TODO(@lishaduck) [engine:node@>=18]: Upgrade `tseslint`.

Check warning on line 3 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / test

There is a TODO match for Node.js version: node>=18. Upgrade `tseslint`
// TODO(@lishaduck) [engine:node@>=18]: Use `eslint-define-config` to get type checking for this file.

Check warning on line 4 in .eslintrc.js

View workflow job for this annotation

GitHub Actions / test

There is a TODO match for Node.js version: node>=18. Use `eslint-define-config` to get type checking for this file
Expand Down Expand Up @@ -32,7 +33,6 @@ module.exports = {
'test/snapshots',
'test/temporary',
'vendor/',
'.eslintrc.js',
'new-package/elm-review-package-tests/check-previews-compile.js'
],
rules: {
Expand Down Expand Up @@ -114,6 +114,13 @@ module.exports = {
'n/no-process-exit': 'off',
'@typescript-eslint/unbound-method': 'off' // TODO(@lishaduck): Fix this warning. I just got confused.
}
},
{
files: ['.eslintrc.js'],
rules: {
camelcase: 'off',
'@typescript-eslint/prefer-nullish-coalescing': 'off' // It's not happy with how TS is set up on this config file.
}
}
],
globals: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"check-engines": "ls-engines --mode=ideal",
"elm-format": "elm-format --validate ast-codec init-templates new-package parseElm review template",
"elm-tests": "(cd template/ && elm make src/Elm/Review/Main.elm --output=/dev/null && elm-test)",
"eslint-check": "eslint . --report-unused-disable-directives --max-warnings=2",
"eslint-check": "eslint . --report-unused-disable-directives --max-warnings=7",
"eslint-fix": "npm run eslint-check -- --fix",
"jest": "npx jest",
"prepare": "elm-tooling install",
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"exclude": [
"node_modules",
"**/elm-stuff/",
".eslintrc.js",
"new-package/elm-review-package-tests/check-previews-compile.js",
"test/temporary"
]
Expand Down

0 comments on commit d1114d2

Please sign in to comment.