Skip to content

Commit

Permalink
Move ESLint flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Mar 11, 2024
1 parent 88ca79f commit 65cabe6
Show file tree
Hide file tree
Showing 3 changed files with 246 additions and 82 deletions.
28 changes: 28 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import loguxConfig from '@logux/eslint-config'

/** @type {import('eslint').Linter.FlatConfig[]} */
export default [
{
ignores: ['fixtures/', 'packages/*/test/fixtures/']
},
...loguxConfig,
{
rules: {
'n/global-require': 'off',
'no-console': 'off',
'no-control-regex': 'off'
}
},
{
files: ['**/*.test.js'],
rules: {
'n/no-extraneous-require': 'off'
}
},
{
files: ['packages/size-limit/run.js'],
rules: {
'consistent-return': 'off'
}
}
]
36 changes: 1 addition & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test": "vitest run --coverage && eslint . && sh scripts/max-listeners-check.sh"
},
"devDependencies": {
"@logux/eslint-config": "^52.0.2",
"@logux/eslint-config": "^53.0.0",
"@size-limit/esbuild": "workspace:^",
"@size-limit/esbuild-why": "workspace:^",
"@size-limit/file": "workspace:^",
Expand All @@ -23,45 +23,11 @@
"clean-publish": "^4.3.0",
"cross-spawn": "^7.0.3",
"eslint": "^8.57.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-node-imports": "^1.0.2",
"eslint-plugin-perfectionist": "^2.6.0",
"eslint-plugin-prefer-let": "^3.0.1",
"eslint-plugin-promise": "^6.1.1",
"print-snapshots": "^0.4.2",
"redux": "^4.2.1",
"size-limit-node-esbuild": "^0.3.0",
"vitest": "^1.3.1"
},
"eslintConfig": {
"extends": "@logux/eslint-config",
"rules": {
"n/global-require": "off",
"no-control-regex": "off",
"no-console": "off"
},
"overrides": [
{
"files": "*.test.js",
"rules": {
"n/no-extraneous-require": "off"
}
},
{
"files": "packages/size-limit/run.js",
"rules": {
"consistent-return": "off"
}
}
]
},
"eslintIgnore": [
"node_modules",
"fixtures",
"**/errors.ts"
],
"prettier": {
"arrowParens": "avoid",
"jsxSingleQuote": false,
Expand Down

0 comments on commit 65cabe6

Please sign in to comment.