@ocavue/eslint-config 1.11.2 → 2.0.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/eslint.config.d.ts +1 -1
- package/dist/src/antfu.d.ts +1 -1
- package/dist/src/antfu.d.ts.map +1 -1
- package/dist/src/basic.d.ts +1 -1
- package/dist/src/basic.d.ts.map +1 -1
- package/dist/src/imports.d.ts +1 -1
- package/dist/src/imports.d.ts.map +1 -1
- package/dist/src/markdown.d.ts +1 -1
- package/dist/src/markdown.d.ts.map +1 -1
- package/dist/src/no-only-tests.d.ts +1 -1
- package/dist/src/no-only-tests.d.ts.map +1 -1
- package/dist/src/package-json.d.ts +1 -1
- package/dist/src/package-json.d.ts.map +1 -1
- package/dist/src/prettier.d.ts +1 -1
- package/dist/src/prettier.d.ts.map +1 -1
- package/dist/src/react.d.ts +1 -1
- package/dist/src/react.d.ts.map +1 -1
- package/dist/src/typescript.d.ts +1 -1
- package/dist/src/typescript.d.ts.map +1 -1
- package/dist/src/unicorn.d.ts +1 -1
- package/dist/src/unicorn.d.ts.map +1 -1
- package/dist/src/vue.d.ts +1 -1
- package/dist/src/vue.d.ts.map +1 -1
- package/package.json +8 -7
- package/src/antfu.js +1 -1
- package/src/basic.js +1 -1
- package/src/imports.js +1 -1
- package/src/markdown.js +2 -3
- package/src/no-only-tests.js +1 -1
- package/src/package-json.js +1 -1
- package/src/prettier.js +1 -1
- package/src/react.js +2 -2
- package/src/typescript.js +9 -12
- package/src/unicorn.js +1 -1
- package/src/vue.js +2 -2
package/dist/eslint.config.d.ts
CHANGED
package/dist/src/antfu.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function antfu(): import("eslint").Linter.
|
|
1
|
+
export function antfu(): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
2
2
|
//# sourceMappingURL=antfu.d.ts.map
|
package/dist/src/antfu.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"antfu.d.ts","sourceRoot":"","sources":["../../src/antfu.js"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"antfu.d.ts","sourceRoot":"","sources":["../../src/antfu.js"],"names":[],"mappings":"AAEA,+FAgBC"}
|
package/dist/src/basic.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function basic(): import("eslint").Linter.
|
|
1
|
+
export function basic(): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
2
2
|
//# sourceMappingURL=basic.d.ts.map
|
package/dist/src/basic.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic.d.ts","sourceRoot":"","sources":["../../src/basic.js"],"names":[],"mappings":"AAWA
|
|
1
|
+
{"version":3,"file":"basic.d.ts","sourceRoot":"","sources":["../../src/basic.js"],"names":[],"mappings":"AAWA,+FAcC"}
|
package/dist/src/imports.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function imports(): import("eslint").Linter.
|
|
1
|
+
export function imports(): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
2
2
|
//# sourceMappingURL=imports.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imports.d.ts","sourceRoot":"","sources":["../../src/imports.js"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"imports.d.ts","sourceRoot":"","sources":["../../src/imports.js"],"names":[],"mappings":"AAIA,iGA6CC"}
|
package/dist/src/markdown.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function markdown(): import("eslint").Linter.
|
|
1
|
+
export function markdown(): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
2
2
|
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/markdown.js"],"names":[],"mappings":"AAMA,
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/markdown.js"],"names":[],"mappings":"AAMA,kGA6CC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function noOnlyTests(): import("eslint").Linter.
|
|
1
|
+
export function noOnlyTests(): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
2
2
|
//# sourceMappingURL=no-only-tests.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-only-tests.d.ts","sourceRoot":"","sources":["../../src/no-only-tests.js"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"no-only-tests.d.ts","sourceRoot":"","sources":["../../src/no-only-tests.js"],"names":[],"mappings":"AAIA,qGAeC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Sort package.json keys
|
|
3
3
|
*/
|
|
4
|
-
export function packageJson(): import("eslint").Linter.
|
|
4
|
+
export function packageJson(): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
5
5
|
//# sourceMappingURL=package-json.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-json.d.ts","sourceRoot":"","sources":["../../src/package-json.js"],"names":[],"mappings":"AAOA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"package-json.d.ts","sourceRoot":"","sources":["../../src/package-json.js"],"names":[],"mappings":"AAOA;;GAEG;AACH,qGA0EC"}
|
package/dist/src/prettier.d.ts
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* Notice that this config does not run `prettier` as an ESLint rule, so you
|
|
5
5
|
* have to run `pretter` separately for formatting.
|
|
6
6
|
*/
|
|
7
|
-
export function prettier(): import("eslint").Linter.
|
|
7
|
+
export function prettier(): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
8
8
|
//# sourceMappingURL=prettier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prettier.d.ts","sourceRoot":"","sources":["../../src/prettier.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"prettier.d.ts","sourceRoot":"","sources":["../../src/prettier.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,kGAYC"}
|
package/dist/src/react.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function react(): import("eslint").Linter.
|
|
1
|
+
export function react(): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
2
2
|
//# sourceMappingURL=react.d.ts.map
|
package/dist/src/react.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/react.js"],"names":[],"mappings":"AAUA
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/react.js"],"names":[],"mappings":"AAUA,+FAiCC"}
|
package/dist/src/typescript.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function typescript(): import("eslint").Linter.
|
|
1
|
+
export function typescript(): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
2
2
|
export { tseslint };
|
|
3
3
|
import tseslint from 'typescript-eslint';
|
|
4
4
|
//# sourceMappingURL=typescript.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/typescript.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/typescript.js"],"names":[],"mappings":"AASA,oGA6FC;;qBAnGoB,mBAAmB"}
|
package/dist/src/unicorn.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function unicorn(): import("eslint").Linter.
|
|
1
|
+
export function unicorn(): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
2
2
|
//# sourceMappingURL=unicorn.d.ts.map
|
|
@@ -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,iGAsEC"}
|
package/dist/src/vue.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function vue(): import("eslint").Linter.
|
|
1
|
+
export function vue(): import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
2
2
|
//# sourceMappingURL=vue.d.ts.map
|
package/dist/src/vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../../src/vue.js"],"names":[],"mappings":"AAWA,
|
|
1
|
+
{"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../../src/vue.js"],"names":[],"mappings":"AAWA,6FAgCC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ocavue/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
5
|
-
"packageManager": "pnpm@
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"packageManager": "pnpm@9.5.0",
|
|
6
6
|
"description": "",
|
|
7
7
|
"author": "ocavue <ocavue@gmail.com>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -31,14 +31,13 @@
|
|
|
31
31
|
"prepublishOnly": "nr build"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@eslint-types/typescript-eslint": "^7.5.0",
|
|
35
34
|
"@eslint-types/unicorn": "^52.0.0",
|
|
36
|
-
"@
|
|
35
|
+
"@eslint/js": "^9.8.0",
|
|
36
|
+
"@types/eslint": "^9.6.0",
|
|
37
37
|
"@types/eslint-plugin-markdown": "^2.0.2",
|
|
38
38
|
"eslint-config-prettier": "^9.1.0",
|
|
39
39
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
40
40
|
"eslint-plugin-antfu": "^2.3.4",
|
|
41
|
-
"eslint-plugin-deprecation": "^3.0.0",
|
|
42
41
|
"eslint-plugin-import-x": "^3.1.0",
|
|
43
42
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
44
43
|
"eslint-plugin-markdown": "^5.1.0",
|
|
@@ -48,13 +47,15 @@
|
|
|
48
47
|
"eslint-plugin-unicorn": "^54.0.0",
|
|
49
48
|
"eslint-plugin-vue": "^9.27.0",
|
|
50
49
|
"jsonc-eslint-parser": "^2.4.0",
|
|
51
|
-
"typescript-eslint": "^
|
|
50
|
+
"typescript-eslint": "^8.0.0"
|
|
52
51
|
},
|
|
53
52
|
"devDependencies": {
|
|
54
53
|
"@antfu/ni": "^0.22.0",
|
|
55
54
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
55
|
+
"@types/eslint__js": "^8.42.3",
|
|
56
56
|
"@types/node": "^20.14.12",
|
|
57
|
-
"eslint": "^8.
|
|
57
|
+
"@typescript-eslint/utils": "^8.0.0",
|
|
58
|
+
"eslint": "^9.8.0",
|
|
58
59
|
"prettier": "^3.3.3",
|
|
59
60
|
"typescript": "^5.5.4"
|
|
60
61
|
},
|
package/src/antfu.js
CHANGED
package/src/basic.js
CHANGED
|
@@ -10,7 +10,7 @@ import { typescript } from './typescript.js'
|
|
|
10
10
|
import { unicorn } from './unicorn.js'
|
|
11
11
|
|
|
12
12
|
export function basic() {
|
|
13
|
-
/** @type {import('eslint').Linter.
|
|
13
|
+
/** @type {import('eslint').Linter.Config[]} */
|
|
14
14
|
const config = [
|
|
15
15
|
{ ignores: [...GLOB_EXCLUDE] },
|
|
16
16
|
...typescript(),
|
package/src/imports.js
CHANGED
package/src/markdown.js
CHANGED
|
@@ -5,7 +5,7 @@ import markdownPlugin from 'eslint-plugin-markdown'
|
|
|
5
5
|
import { GLOB_MARKDOWN, GLOB_SRC, GLOB_VUE } from './shared.js'
|
|
6
6
|
|
|
7
7
|
export function markdown() {
|
|
8
|
-
/** @type {import('eslint').Linter.
|
|
8
|
+
/** @type {import('eslint').Linter.Config[]} */
|
|
9
9
|
const config = [
|
|
10
10
|
// @ts-expect-error: @types/eslint-plugin-markdown is not up to date
|
|
11
11
|
...markdownPlugin.configs.recommended,
|
|
@@ -14,7 +14,7 @@ export function markdown() {
|
|
|
14
14
|
files: [`${GLOB_MARKDOWN}/${GLOB_SRC}`, `${GLOB_MARKDOWN}/${GLOB_VUE}`],
|
|
15
15
|
languageOptions: {
|
|
16
16
|
parserOptions: {
|
|
17
|
-
|
|
17
|
+
projectService: null,
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
rules: {
|
|
@@ -35,7 +35,6 @@ export function markdown() {
|
|
|
35
35
|
'@typescript-eslint/await-thenable': 'off',
|
|
36
36
|
'@typescript-eslint/unbound-method': 'off',
|
|
37
37
|
'@typescript-eslint/require-await': 'off',
|
|
38
|
-
'deprecation/deprecation': 'off',
|
|
39
38
|
|
|
40
39
|
// Disable some import rules because they are not working well with
|
|
41
40
|
// twoslash ---cut--- imports.
|
package/src/no-only-tests.js
CHANGED
package/src/package-json.js
CHANGED
|
@@ -9,7 +9,7 @@ import { GLOB_PACKAGE_JSON } from './shared.js'
|
|
|
9
9
|
* Sort package.json keys
|
|
10
10
|
*/
|
|
11
11
|
export function packageJson() {
|
|
12
|
-
/** @type {import('eslint').Linter.
|
|
12
|
+
/** @type {import('eslint').Linter.Config[]} */
|
|
13
13
|
const config = [
|
|
14
14
|
{
|
|
15
15
|
name: 'package-json',
|
package/src/prettier.js
CHANGED
|
@@ -7,7 +7,7 @@ import prettierConfig from 'eslint-config-prettier'
|
|
|
7
7
|
* have to run `pretter` separately for formatting.
|
|
8
8
|
*/
|
|
9
9
|
export function prettier() {
|
|
10
|
-
/** @type {import('eslint').Linter.
|
|
10
|
+
/** @type {import('eslint').Linter.Config[]} */
|
|
11
11
|
const config = [
|
|
12
12
|
{
|
|
13
13
|
name: 'prettier',
|
package/src/react.js
CHANGED
|
@@ -5,11 +5,11 @@ import reactHooksPlugin from 'eslint-plugin-react-hooks'
|
|
|
5
5
|
|
|
6
6
|
import { GLOB_TS, GLOB_TSX } from './shared.js'
|
|
7
7
|
|
|
8
|
-
/** @type {import('eslint').Linter.
|
|
8
|
+
/** @type {import('eslint').Linter.Config} */
|
|
9
9
|
const reactRecommended = reactPlugin.configs.flat.recommended
|
|
10
10
|
|
|
11
11
|
export function react() {
|
|
12
|
-
/** @type {import('eslint').Linter.
|
|
12
|
+
/** @type {import('eslint').Linter.Config[]} */
|
|
13
13
|
const config = [
|
|
14
14
|
{
|
|
15
15
|
...reactRecommended,
|
package/src/typescript.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import deprecationPlugin from 'eslint-plugin-deprecation'
|
|
3
|
+
import eslint from '@eslint/js'
|
|
6
4
|
import tseslint from 'typescript-eslint'
|
|
7
5
|
|
|
8
6
|
import { GLOB_JS, GLOB_JSX, GLOB_TEST, GLOB_TS, GLOB_TSX } from './shared.js'
|
|
@@ -14,25 +12,22 @@ export function typescript() {
|
|
|
14
12
|
.map((config) => config.rules || {})
|
|
15
13
|
.reduce((acc, cur) => ({ ...acc, ...cur }), {})
|
|
16
14
|
|
|
17
|
-
/** @type {import('eslint').
|
|
15
|
+
/** @type {import('@typescript-eslint/utils').TSESLint.FlatConfig.ConfigArray} */
|
|
18
16
|
const config = [
|
|
17
|
+
eslint.configs.recommended,
|
|
19
18
|
{
|
|
20
19
|
name: 'typescript',
|
|
21
20
|
files: [GLOB_TS, GLOB_TSX, GLOB_JS, GLOB_JSX],
|
|
22
21
|
languageOptions: {
|
|
23
|
-
// @ts-expect-error: conflict type
|
|
24
22
|
parser: tseslint.parser,
|
|
25
23
|
parserOptions: {
|
|
26
|
-
|
|
24
|
+
projectService: true,
|
|
27
25
|
sourceType: 'module',
|
|
28
26
|
ecmaVersion: 'latest',
|
|
29
27
|
},
|
|
30
28
|
},
|
|
31
29
|
plugins: {
|
|
32
|
-
// @ts-expect-error: conflict type
|
|
33
30
|
'@typescript-eslint': tseslint.plugin,
|
|
34
|
-
// @ts-expect-error: conflict type
|
|
35
|
-
deprecation: deprecationPlugin,
|
|
36
31
|
},
|
|
37
32
|
rules: {
|
|
38
33
|
...rules,
|
|
@@ -75,8 +70,6 @@ export function typescript() {
|
|
|
75
70
|
'@typescript-eslint/unbound-method': 'error',
|
|
76
71
|
// TODO: We should set the rule below to error in the future
|
|
77
72
|
'@typescript-eslint/require-await': 'warn',
|
|
78
|
-
|
|
79
|
-
'deprecation/deprecation': 'warn',
|
|
80
73
|
},
|
|
81
74
|
},
|
|
82
75
|
{
|
|
@@ -102,5 +95,9 @@ export function typescript() {
|
|
|
102
95
|
},
|
|
103
96
|
]
|
|
104
97
|
|
|
105
|
-
|
|
98
|
+
/** @type {import('eslint').Linter.Config[]} */
|
|
99
|
+
// @ts-expect-error: unmatched type
|
|
100
|
+
const configTyped = config
|
|
101
|
+
|
|
102
|
+
return configTyped
|
|
106
103
|
}
|
package/src/unicorn.js
CHANGED
package/src/vue.js
CHANGED
|
@@ -6,11 +6,11 @@ import tseslint from 'typescript-eslint'
|
|
|
6
6
|
|
|
7
7
|
import { GLOB_VUE } from './shared.js'
|
|
8
8
|
|
|
9
|
-
/** @type {import('eslint').Linter.
|
|
9
|
+
/** @type {import('eslint').Linter.Config[]} */
|
|
10
10
|
const vueRecommended = vuePlugin.configs['flat/recommended']
|
|
11
11
|
|
|
12
12
|
export function vue() {
|
|
13
|
-
/** @type {import('eslint').Linter.
|
|
13
|
+
/** @type {import('eslint').Linter.Config[]} */
|
|
14
14
|
const config = [
|
|
15
15
|
...vueRecommended,
|
|
16
16
|
{
|