@ocavue/eslint-config 1.2.3 → 1.2.4-beta.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/basic.d.ts +1 -11
- package/dist/src/basic.d.ts.map +1 -1
- package/dist/src/typescript.d.ts +1 -16
- package/dist/src/typescript.d.ts.map +1 -1
- package/package.json +24 -25
- package/src/basic.js +2 -10
- package/src/typescript.js +8 -26
package/dist/src/basic.d.ts
CHANGED
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* @typedef {Object} BasicOptions
|
|
3
|
-
* @property {import('./typescript.js').TypescriptOptions} [typescript]
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* @param {BasicOptions} [options]
|
|
7
|
-
*/
|
|
8
|
-
export function basic(options?: BasicOptions | undefined): import("eslint-define-config").FlatESLintConfigItem[];
|
|
9
|
-
export type BasicOptions = {
|
|
10
|
-
typescript?: import("./typescript.js").TypescriptOptions | undefined;
|
|
11
|
-
};
|
|
1
|
+
export function basic(): import("eslint-define-config").FlatESLintConfigItem[];
|
|
12
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,+EAiBC"}
|
package/dist/src/typescript.d.ts
CHANGED
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @typedef {Object} TypescriptOptions
|
|
3
|
-
* @property {string | false} [project] - Path to tsconfig.json, defaults
|
|
4
|
-
* to './tsconfig.json'. You can pass `false` to disable the tsconfig.json check.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* @param {TypescriptOptions} [options]
|
|
8
|
-
*/
|
|
9
|
-
export function typescript(options?: TypescriptOptions | undefined): import("eslint-define-config").FlatESLintConfigItem[];
|
|
10
|
-
export type TypescriptOptions = {
|
|
11
|
-
/**
|
|
12
|
-
* - Path to tsconfig.json, defaults
|
|
13
|
-
* to './tsconfig.json'. You can pass `false` to disable the tsconfig.json check.
|
|
14
|
-
*/
|
|
15
|
-
project?: string | false | undefined;
|
|
16
|
-
};
|
|
1
|
+
export function typescript(): import("eslint-define-config").FlatESLintConfigItem[];
|
|
17
2
|
import tsParser from '@typescript-eslint/parser';
|
|
18
3
|
import tsPlugin from '@typescript-eslint/eslint-plugin';
|
|
19
4
|
export { tsParser, tsPlugin };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/typescript.js"],"names":[],"mappings":"AAUA
|
|
1
|
+
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/typescript.js"],"names":[],"mappings":"AAUA,oFAgEC;qBAvEoB,2BAA2B;qBAD3B,kCAAkC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ocavue/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
5
|
-
"packageManager": "pnpm@8.
|
|
4
|
+
"version": "1.2.4-beta.0",
|
|
5
|
+
"packageManager": "pnpm@8.9.0",
|
|
6
6
|
"description": "",
|
|
7
7
|
"author": "ocavue <ocavue@gmail.com>",
|
|
8
8
|
"license": "MIT",
|
|
@@ -23,42 +23,41 @@
|
|
|
23
23
|
"src",
|
|
24
24
|
"dist"
|
|
25
25
|
],
|
|
26
|
-
"scripts": {
|
|
27
|
-
"build": "tsc",
|
|
28
|
-
"lint": "eslint .",
|
|
29
|
-
"check": "prettier --check .",
|
|
30
|
-
"fix": "eslint --fix . && prettier --write .",
|
|
31
|
-
"prepublishOnly": "nr build"
|
|
32
|
-
},
|
|
33
26
|
"dependencies": {
|
|
34
|
-
"@types/eslint": "^8.44.
|
|
27
|
+
"@types/eslint": "^8.44.4",
|
|
35
28
|
"@types/eslint-plugin-markdown": "^2.0.0",
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
37
|
-
"@typescript-eslint/parser": "^
|
|
38
|
-
"eslint-config-prettier": "^
|
|
39
|
-
"eslint-define-config": "^1.
|
|
40
|
-
"eslint-import-resolver-typescript": "^3.
|
|
41
|
-
"eslint-plugin-antfu": "^0.
|
|
42
|
-
"eslint-plugin-deprecation": "^
|
|
43
|
-
"eslint-plugin-import": "^2.28.
|
|
44
|
-
"eslint-plugin-jsonc": "^2.
|
|
29
|
+
"@typescript-eslint/eslint-plugin": "^6.7.5",
|
|
30
|
+
"@typescript-eslint/parser": "^6.7.5",
|
|
31
|
+
"eslint-config-prettier": "^9.0.0",
|
|
32
|
+
"eslint-define-config": "^1.24.1",
|
|
33
|
+
"eslint-import-resolver-typescript": "^3.6.1",
|
|
34
|
+
"eslint-plugin-antfu": "^0.43.1",
|
|
35
|
+
"eslint-plugin-deprecation": "^2.0.0",
|
|
36
|
+
"eslint-plugin-import": "^2.28.1",
|
|
37
|
+
"eslint-plugin-jsonc": "^2.10.0",
|
|
45
38
|
"eslint-plugin-markdown": "^3.0.1",
|
|
46
39
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
47
|
-
"eslint-plugin-react": "^7.33.
|
|
40
|
+
"eslint-plugin-react": "^7.33.2",
|
|
48
41
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
49
42
|
"eslint-plugin-unicorn": "^47.0.0",
|
|
50
43
|
"jsonc-eslint-parser": "^2.3.0"
|
|
51
44
|
},
|
|
52
45
|
"devDependencies": {
|
|
53
|
-
"@antfu/ni": "^0.21.
|
|
54
|
-
"@types/node": "^18.
|
|
55
|
-
"eslint": "^8.
|
|
46
|
+
"@antfu/ni": "^0.21.8",
|
|
47
|
+
"@types/node": "^18.18.4",
|
|
48
|
+
"eslint": "^8.51.0",
|
|
56
49
|
"prettier": "^2.8.8",
|
|
57
|
-
"typescript": "^5.
|
|
50
|
+
"typescript": "^5.2.2"
|
|
58
51
|
},
|
|
59
52
|
"renovate": {
|
|
60
53
|
"extends": [
|
|
61
54
|
"github>ocavue/config-renovate"
|
|
62
55
|
]
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsc",
|
|
59
|
+
"lint": "eslint .",
|
|
60
|
+
"check": "prettier --check .",
|
|
61
|
+
"fix": "eslint --fix . && prettier --write ."
|
|
63
62
|
}
|
|
64
|
-
}
|
|
63
|
+
}
|
package/src/basic.js
CHANGED
|
@@ -9,22 +9,14 @@ import { GLOB_EXCLUDE } from './shared.js'
|
|
|
9
9
|
import { typescript } from './typescript.js'
|
|
10
10
|
import { unicorn } from './unicorn.js'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
* @typedef {Object} BasicOptions
|
|
14
|
-
* @property {import('./typescript.js').TypescriptOptions} [typescript]
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @param {BasicOptions} [options]
|
|
19
|
-
*/
|
|
20
|
-
export function basic(options) {
|
|
12
|
+
export function basic() {
|
|
21
13
|
/** @type {import('eslint-define-config').FlatESLintConfigItem[]} */
|
|
22
14
|
const config = [
|
|
23
15
|
{
|
|
24
16
|
// @ts-expect-error: 'readonly' and cannot be assigned to the mutable type 'string[]'
|
|
25
17
|
ignores: GLOB_EXCLUDE,
|
|
26
18
|
},
|
|
27
|
-
...typescript(
|
|
19
|
+
...typescript(),
|
|
28
20
|
...imports(),
|
|
29
21
|
...packageJson(),
|
|
30
22
|
...unicorn(),
|
package/src/typescript.js
CHANGED
|
@@ -8,34 +8,18 @@ import { GLOB_JS, GLOB_JSX, GLOB_TS, GLOB_TSX } from './shared.js'
|
|
|
8
8
|
|
|
9
9
|
export { tsParser, tsPlugin }
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
* @typedef {Object} TypescriptOptions
|
|
13
|
-
* @property {string | false} [project] - Path to tsconfig.json, defaults
|
|
14
|
-
* to './tsconfig.json'. You can pass `false` to disable the tsconfig.json check.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @param {TypescriptOptions} [options]
|
|
19
|
-
*/
|
|
20
|
-
export function typescript(options) {
|
|
21
|
-
const project = options?.project ?? './tsconfig.json'
|
|
22
|
-
|
|
11
|
+
export function typescript() {
|
|
23
12
|
/** @type {import('eslint-define-config').FlatESLintConfigItem[]} */
|
|
24
13
|
const config = [
|
|
25
14
|
{
|
|
26
15
|
files: [GLOB_TS, GLOB_TSX, GLOB_JS, GLOB_JSX],
|
|
27
16
|
languageOptions: {
|
|
28
17
|
parser: tsParser,
|
|
29
|
-
parserOptions:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
: {
|
|
36
|
-
sourceType: 'module',
|
|
37
|
-
ecmaVersion: 'latest',
|
|
38
|
-
},
|
|
18
|
+
parserOptions: {
|
|
19
|
+
EXPERIMENTAL_useProjectService: true,
|
|
20
|
+
sourceType: 'module',
|
|
21
|
+
ecmaVersion: 'latest',
|
|
22
|
+
},
|
|
39
23
|
},
|
|
40
24
|
plugins: {
|
|
41
25
|
// @ts-expect-error: they just don't play very well
|
|
@@ -45,10 +29,8 @@ export function typescript(options) {
|
|
|
45
29
|
},
|
|
46
30
|
rules: {
|
|
47
31
|
...tsPlugin.configs['eslint-recommended'].overrides?.[0].rules,
|
|
48
|
-
...tsPlugin.configs['recommended'].rules,
|
|
49
|
-
...
|
|
50
|
-
? tsPlugin.configs['recommended-requiring-type-checking'].rules
|
|
51
|
-
: null),
|
|
32
|
+
...tsPlugin.configs['recommended-type-checked'].rules,
|
|
33
|
+
...tsPlugin.configs['stylistic-type-checked'].rules,
|
|
52
34
|
|
|
53
35
|
'@typescript-eslint/no-unsafe-call': 'warn',
|
|
54
36
|
'@typescript-eslint/restrict-plus-operands': 'warn',
|