Skip to content

Commit d3e4280

Browse files
chore(deps): update dependency @jenssimon/eslint-config-base to v8 (#220)
* chore(deps): update dependency @jenssimon/eslint-config-base to v8 * chore(deps): use flat config --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jens Simon <[email protected]>
1 parent dee40f6 commit d3e4280

File tree

5 files changed

+2010
-2507
lines changed

5 files changed

+2010
-2507
lines changed

commitlint.config.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

commitlint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default { extends: ['@commitlint/config-conventional'] }

eslint.config.mjs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import path from 'node:path'
2+
import { fileURLToPath } from 'node:url'
3+
4+
import { FlatCompat } from '@eslint/eslintrc'
5+
import { fixupConfigRules } from '@eslint/compat'
6+
7+
8+
// mimic CommonJS variables -- not needed if using CommonJS
9+
const __filename = fileURLToPath(import.meta.url) // eslint-disable-line no-underscore-dangle
10+
const __dirname = path.dirname(__filename) // eslint-disable-line no-underscore-dangle
11+
12+
const compat = new FlatCompat({
13+
baseDirectory: __dirname,
14+
})
15+
16+
17+
export default [
18+
{
19+
ignores: [
20+
'.yarn/',
21+
'.yalc/',
22+
],
23+
},
24+
25+
...fixupConfigRules(compat.config({
26+
extends: [
27+
'@jenssimon/base',
28+
],
29+
})).map((rule) => ({
30+
files: [
31+
'**/*.js',
32+
'**/*.mjs',
33+
],
34+
...rule,
35+
})),
36+
37+
{
38+
files: [
39+
'**/*.js',
40+
],
41+
rules: {
42+
'unicorn/prefer-module': 'off',
43+
},
44+
},
45+
]

package.json

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"/index.js"
1919
],
2020
"scripts": {
21-
"lint": "eslint --ext .js,.ts,.cjs,.mjs,.cts,.mts ./",
21+
"lint": "eslint ./",
2222
"commit": "cz",
2323
"postinstall": "husky",
2424
"prepack": "pinst --disable",
@@ -34,7 +34,9 @@
3434
"devDependencies": {
3535
"@commitlint/cli": "^19.0.0",
3636
"@commitlint/config-conventional": "^19.0.0",
37-
"@jenssimon/eslint-config-base": "^7.3.1",
37+
"@eslint/compat": "^1.2.4",
38+
"@eslint/eslintrc": "^3.2.0",
39+
"@jenssimon/eslint-config-base": "^8.0.0",
3840
"@types/node": "^22.0.0",
3941
"commitizen": "^4.3.0",
4042
"cz-conventional-changelog": "^3.3.0",
@@ -51,16 +53,8 @@
5153
"eslint": "^7.0.0 || ^8.0.0",
5254
"typescript": ">=4.0.0"
5355
},
54-
"eslintConfig": {
55-
"extends": [
56-
"@jenssimon/base"
57-
],
58-
"rules": {
59-
"unicorn/prefer-module": "off"
60-
}
61-
},
6256
"lint-staged": {
63-
"**/*.{js,ts}": "eslint"
57+
"**/*.{js,mjs}": "eslint"
6458
},
6559
"packageManager": "[email protected]",
6660
"config": {

0 commit comments

Comments
 (0)