Skip to content

Commit

Permalink
fix(ignore): Migrate to eslint 9 (#1154)
Browse files Browse the repository at this point in the history
* Migrate to eslint 9

* Automatic changes

* Manual fixes

* Feedback
  • Loading branch information
Koenkk authored Aug 18, 2024
1 parent 81d828b commit 1ff1dc7
Show file tree
Hide file tree
Showing 95 changed files with 942 additions and 948 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

44 changes: 0 additions & 44 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/update_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
node-version: 20
cache: npm
- run: npx npm-check-updates -u -x eslint
- run: npx npm-check-updates -u
- run: rm -f package-lock.json
- run: npm install
- uses: peter-evans/create-pull-request@v6
Expand Down
19 changes: 18 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,22 @@
"printWidth": 150,
"bracketSpacing": false,
"endOfLine": "lf",
"tabWidth": 4
"tabWidth": 4,
"importOrder": [
"",
"<TYPES>^(node:)",
"",
"<TYPES>",
"",
"<TYPES>^[.]",
"",
"<BUILTIN_MODULES>",
"",
"<THIRD_PARTY_MODULES>",
"",
"^zigbee",
"",
"^[.]"
],
"plugins": ["@ianvs/prettier-plugin-sort-imports"]
}
32 changes: 32 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// @ts-check

import eslint from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
parserOptions: {
project: './tsconfig.json',
},
},
rules: {
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-comment': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'array-bracket-spacing': ['error', 'never'],
'no-return-await': 'error',
'object-curly-spacing': ['error', 'never'],
'@typescript-eslint/no-floating-promises': 'error',
},
},
{
ignores: ['typedoc/', 'test/', 'dist/', '**/*.js', '**/*.mjs'],
},
eslintConfigPrettier,
);
Loading

0 comments on commit 1ff1dc7

Please sign in to comment.