Skip to content

Commit f7f3ecf

Browse files
committed
chore(repo): update eslint config to flat
1 parent c423fab commit f7f3ecf

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

.eslintrc.cjs

-3
This file was deleted.

eslint.config.js

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import path from 'node:path';
2+
3+
import dz from '@d-zero/eslint-config';
4+
5+
import scaffold from './packages/@d-zero/scaffold/eslint.config.js';
6+
7+
/**
8+
* @type {import('eslint').Linter.Config[]}
9+
*/
10+
export default [
11+
...dz.configs.node,
12+
...scaffold,
13+
{
14+
files: ['**/{*.{config,spec}.{js,mjs,ts},*.*rc,*.*rc.{js,mjs}}'],
15+
rules: {
16+
'import/no-extraneous-dependencies': 0,
17+
},
18+
},
19+
{
20+
ignores: [
21+
...scaffold.flatMap(
22+
(config) =>
23+
config.ignores?.map((ignorePath) =>
24+
path.join('packages', '@d-zero', 'scaffold', ignorePath),
25+
) ?? [],
26+
),
27+
'**/dist/**/*',
28+
],
29+
},
30+
];

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"test": "vitest run --test-timeout 60000",
1313
"lint": "run-s lint:eslint lint:prettier lint:textlint lint:cspell",
1414
"lint:cspell": "cspell --no-progress --show-suggestions \"**\"",
15-
"lint:eslint": "eslint --fix \"./*.{js,cjs,mjs}\"",
15+
"lint:eslint": "eslint --fix \"./{*,**/*}.{js,cjs,mjs}\"",
1616
"lint:prettier": "prettier --write \"./**/*.{js,jsx,ts,tsx,scss,pug,html}\"",
1717
"lint:textlint": "textlint --fix \"./**/*.md\" && textlint \"./**/*.md\"",
1818
"release": "lerna publish --exact --conventional-commits --conventional-graduate",

0 commit comments

Comments
 (0)