Skip to content

Commit

Permalink
Move to flat ESLint config
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Mar 8, 2024
1 parent e391e11 commit 40ad105
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 68 deletions.
26 changes: 26 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import loguxTsConfig from '@logux/eslint-config/ts'

/** @type {import('eslint').Linter.FlatConfig[]} */
export default [
{
ignores: ['**/errors.ts', 'coverage']
},
...loguxTsConfig,
{
languageOptions: {
globals: {
WebSocket: 'readonly'
}
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'no-invalid-this': 'off'
}
},
{
files: ['server-connection/*.ts', 'ws-connection/*.ts'],
rules: {
'import/order': 'off'
}
}
]
33 changes: 2 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,12 @@
"nanoevents": "^9.0.0"
},
"devDependencies": {
"@logux/eslint-config": "^52.0.2",
"@logux/eslint-config": "^53.0.0",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"c8": "^9.1.0",
"check-dts": "^0.7.2",
"clean-publish": "^4.3.0",
"eslint": "^8.57.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-perfectionist": "^2.6.0",
"eslint-plugin-prefer-let": "^3.0.1",
"eslint-plugin-promise": "^6.1.1",
"nanodelay": "^2.0.2",
"nanospy": "^1.0.0",
"tsm": "^2.3.0",
Expand Down Expand Up @@ -78,26 +70,5 @@
],
"skip-full": true,
"clean": true
},
"eslintConfig": {
"extends": "@logux/eslint-config/ts",
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"no-invalid-this": "off"
},
"overrides": [
{
"files": [
"server-connection/*.ts",
"ws-connection/*.ts"
],
"rules": {
"import/order": "off"
}
}
]
},
"eslintIgnore": [
"**/errors.ts"
]
}
}
115 changes: 78 additions & 37 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 40ad105

Please sign in to comment.