Skip to content

Commit 399fe4d

Browse files
authored
feat(eslint-config): upgrade to v9 (#97)
1 parent 4b4231c commit 399fe4d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2964
-1704
lines changed

.commitlintrc.cjs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
const lernaScopes = require('@commitlint/config-pnpm-scopes')
22

33
module.exports = {
4-
extends: [
5-
'@commitlint/config-conventional',
6-
'@commitlint/config-pnpm-scopes'
7-
],
4+
extends: ['@commitlint/config-conventional', '@commitlint/config-pnpm-scopes'],
85
rules: {
96
'body-max-line-length': [0],
107
'scope-enum': async (ctx) => {

.eslintrc.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

.nano-staged.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"*.{js,ts,tsx}": "eslint --fix"
2+
"*.{c,m,}{js,ts}{x,}": "eslint --flag v10_config_lookup_from_file --fix"
33
}

eslint.config.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { globalIgnores } from 'eslint/config'
2+
import baseConfig from '@trigen/eslint-config'
3+
import testConfig from '@trigen/eslint-config/test'
4+
import env from '@trigen/eslint-config/env'
5+
6+
export default [
7+
globalIgnores(['**/package/']),
8+
...baseConfig,
9+
...testConfig,
10+
env.node,
11+
{
12+
rules: {
13+
'no-console': 'off'
14+
}
15+
}
16+
]

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"scripts": {
2020
"clear": "del './packages/*/dist' ./coverage ./node_modules/.cache",
2121
"lint:package-json": "lint-package-json --monorepo",
22-
"lint": "eslint '*.{js,cjs}' 'packages/**/*.{js,jsx,ts,tsx}'",
22+
"lint": "eslint --flag v10_config_lookup_from_file",
2323
"test:unit": "vitest run",
2424
"test:unit:watch": "vitest watch",
2525
"test": "run -p lint test:unit",
@@ -43,7 +43,7 @@
4343
"clean-publish": "^4.0.0",
4444
"commitizen": "^4.2.4",
4545
"del-cli": "^5.0.0",
46-
"eslint": "^8.0.0",
46+
"eslint": "^9.0.0",
4747
"inquirer": "^8.0.0",
4848
"lerna": "^4.0.0",
4949
"nano-staged": "^0.8.0",

packages/babel-preset/.eslintrc.json

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import commonjsConfig from '@trigen/eslint-config/commonjs'
2+
import rootConfig from '../../eslint.config.js'
3+
4+
export default [...rootConfig, ...commonjsConfig]

packages/babel-preset/src/preset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ module.exports = (api, envOptions, options) => {
100100
try {
101101
require.resolve('react-hot-loader/babel')
102102
plugins.push('react-hot-loader/babel')
103-
} catch (err) {
103+
} catch {
104104
/* Ignore */
105105
}
106106

packages/browserslist-config/.eslintrc.json

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import commonjsConfig from '@trigen/eslint-config/commonjs'
2+
import rootConfig from '../../eslint.config.js'
3+
4+
export default [...rootConfig, ...commonjsConfig]

0 commit comments

Comments
 (0)