@ocavue/eslint-config 2.0.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/ignores.d.ts +2 -0
- package/dist/src/ignores.d.ts.map +1 -0
- package/dist/src/shared.d.ts +1 -2
- package/dist/src/shared.d.ts.map +1 -1
- package/dist/src/unicorn.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/basic.js +2 -2
- package/src/ignores.js +10 -0
- package/src/shared.js +0 -16
- package/src/unicorn.js +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignores.d.ts","sourceRoot":"","sources":["../../src/ignores.js"],"names":[],"mappings":"AAIA,iGAKC"}
|
package/dist/src/shared.d.ts
CHANGED
|
@@ -19,8 +19,7 @@ export const GLOB_YAML: "**/*.y?(a)ml";
|
|
|
19
19
|
export const GLOB_HTML: "**/*.htm?(l)";
|
|
20
20
|
export const GLOB_ALL_SRC: readonly ["**/*.?([cm])[jt]s?(x)", "**/*.{c,le,sc}ss", "**/*.json", "**/*.json5", "**/*.md", "**/*.vue", "**/*.y?(a)ml", "**/*.htm?(l)"];
|
|
21
21
|
export const GLOB_NODE_MODULES: "**/node_modules";
|
|
22
|
-
export const GLOB_DIST: "**/dist";
|
|
23
22
|
export const GLOB_LOCKFILE: readonly ["**/package-lock.json", "**/yarn.lock", "**/pnpm-lock.yaml"];
|
|
24
|
-
export const GLOB_EXCLUDE: readonly ["**/node_modules", "**/
|
|
23
|
+
export const GLOB_EXCLUDE: readonly ["**/node_modules", "**/package-lock.json", "**/yarn.lock", "**/pnpm-lock.yaml", "**/fixtures", "**/.changeset", "**/CHANGELOG*.md", "**/*.min.*", "**/LICENSE*", "**/__snapshots__"];
|
|
25
24
|
export const EXTENSIONS: string[];
|
|
26
25
|
//# sourceMappingURL=shared.d.ts.map
|
package/dist/src/shared.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/shared.js"],"names":[],"mappings":"AAEA,8CAA8C;AAC9C,+CAA+C;AAE/C,uCAAuC;AACvC,yCAAyC;AAEzC,uCAAuC;AACvC,yCAAyC;AAEzC,4DAA4D;AAE5D,4CAA4C;AAC5C,kCAAkC;AAClC,oCAAoC;AACpC,oCAAoC;AAEpC,oCAAoC;AACpC,sCAAsC;AACtC,sCAAsC;AAEtC,kDAAkD;AAElD,sCAAsC;AACtC,kCAAkC;AAClC,uCAAuC;AACvC,uCAAuC;AAEvC,oKASE;AAEF,kDAAyE;AACzE,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/shared.js"],"names":[],"mappings":"AAEA,8CAA8C;AAC9C,+CAA+C;AAE/C,uCAAuC;AACvC,yCAAyC;AAEzC,uCAAuC;AACvC,yCAAyC;AAEzC,4DAA4D;AAE5D,4CAA4C;AAC5C,kCAAkC;AAClC,oCAAoC;AACpC,oCAAoC;AAEpC,oCAAoC;AACpC,sCAAsC;AACtC,sCAAsC;AAEtC,kDAAkD;AAElD,sCAAsC;AACtC,kCAAkC;AAClC,uCAAuC;AACvC,uCAAuC;AAEvC,oKASE;AAEF,kDAAyE;AACzE,mGAIE;AACF,0NAUE;AAEF,kCAGsC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unicorn.d.ts","sourceRoot":"","sources":["../../src/unicorn.js"],"names":[],"mappings":"AAMA,
|
|
1
|
+
{"version":3,"file":"unicorn.d.ts","sourceRoot":"","sources":["../../src/unicorn.js"],"names":[],"mappings":"AAMA,iGAwEC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ocavue/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"packageManager": "pnpm@9.6.0",
|
|
6
6
|
"description": "",
|
|
7
7
|
"author": "ocavue <ocavue@gmail.com>",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"@eslint/js": "^9.8.0",
|
|
37
37
|
"@types/eslint": "^9.6.0",
|
|
38
38
|
"@types/eslint-plugin-markdown": "^2.0.2",
|
|
39
|
+
"eslint-config-flat-gitignore": "^0.1.8",
|
|
39
40
|
"eslint-config-prettier": "^9.1.0",
|
|
40
41
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
41
42
|
"eslint-plugin-antfu": "^2.3.4",
|
package/src/basic.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
3
|
import { antfu } from './antfu.js'
|
|
4
|
+
import { ignores } from './ignores.js'
|
|
4
5
|
import { imports } from './imports.js'
|
|
5
6
|
import { noOnlyTests } from './no-only-tests.js'
|
|
6
7
|
import { packageJson } from './package-json.js'
|
|
7
8
|
import { prettier } from './prettier.js'
|
|
8
|
-
import { GLOB_EXCLUDE } from './shared.js'
|
|
9
9
|
import { typescript } from './typescript.js'
|
|
10
10
|
import { unicorn } from './unicorn.js'
|
|
11
11
|
|
|
12
12
|
export function basic() {
|
|
13
13
|
/** @type {import('eslint').Linter.Config[]} */
|
|
14
14
|
const config = [
|
|
15
|
-
|
|
15
|
+
...ignores(),
|
|
16
16
|
...typescript(),
|
|
17
17
|
...imports(),
|
|
18
18
|
...packageJson(),
|
package/src/ignores.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import gitignore from 'eslint-config-flat-gitignore'
|
|
2
|
+
|
|
3
|
+
import { GLOB_EXCLUDE } from './shared.js'
|
|
4
|
+
|
|
5
|
+
export function ignores() {
|
|
6
|
+
/** @type {import('eslint').Linter.Config[]} */
|
|
7
|
+
const config = [{ ignores: [...GLOB_EXCLUDE] }, gitignore()]
|
|
8
|
+
|
|
9
|
+
return config
|
|
10
|
+
}
|
package/src/shared.js
CHANGED
|
@@ -39,7 +39,6 @@ export const GLOB_ALL_SRC = /** @type {const} */ ([
|
|
|
39
39
|
])
|
|
40
40
|
|
|
41
41
|
export const GLOB_NODE_MODULES = /** @type {const} */ ('**/node_modules')
|
|
42
|
-
export const GLOB_DIST = /** @type {const} */ ('**/dist')
|
|
43
42
|
export const GLOB_LOCKFILE = /** @type {const} */ ([
|
|
44
43
|
'**/package-lock.json',
|
|
45
44
|
'**/yarn.lock',
|
|
@@ -47,25 +46,10 @@ export const GLOB_LOCKFILE = /** @type {const} */ ([
|
|
|
47
46
|
])
|
|
48
47
|
export const GLOB_EXCLUDE = /** @type {const} */ ([
|
|
49
48
|
GLOB_NODE_MODULES,
|
|
50
|
-
GLOB_DIST,
|
|
51
49
|
...GLOB_LOCKFILE,
|
|
52
50
|
|
|
53
|
-
'**/output',
|
|
54
|
-
'**/coverage',
|
|
55
|
-
'**/temp',
|
|
56
51
|
'**/fixtures',
|
|
57
|
-
'**/.vitepress/cache',
|
|
58
|
-
'**/.next',
|
|
59
|
-
'**/.nuxt',
|
|
60
|
-
'**/.vercel',
|
|
61
52
|
'**/.changeset',
|
|
62
|
-
'**/.idea',
|
|
63
|
-
'**/.output',
|
|
64
|
-
'**/.vite-inspect',
|
|
65
|
-
'**/.yalc',
|
|
66
|
-
'**/.svelte-kit',
|
|
67
|
-
'**/dist-types',
|
|
68
|
-
|
|
69
53
|
'**/CHANGELOG*.md',
|
|
70
54
|
'**/*.min.*',
|
|
71
55
|
'**/LICENSE*',
|
package/src/unicorn.js
CHANGED
|
@@ -47,6 +47,8 @@ export function unicorn() {
|
|
|
47
47
|
'unicorn/no-array-push-push': 'warn',
|
|
48
48
|
// Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
49
49
|
'unicorn/no-for-loop': 'error',
|
|
50
|
+
// Disallow eslint-disable comments without specific rule names
|
|
51
|
+
'unicorn/no-abusive-eslint-disable': 'error',
|
|
50
52
|
// Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
51
53
|
'unicorn/prefer-add-event-listener': 'error',
|
|
52
54
|
// Prefer `.find(…)` and `.findLast(…)` over the first or last element from
|