@ocavue/eslint-config 1.10.0 → 1.10.2
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/index.d.ts +1 -0
- package/dist/src/typescript.d.ts.map +1 -1
- package/dist/src/vue.d.ts.map +1 -1
- package/index.js +1 -0
- package/package.json +1 -1
- package/src/typescript.js +11 -3
- package/src/vue.js +14 -7
- package/dist/src/typescript-language-options.d.ts +0 -3
- package/dist/src/typescript-language-options.d.ts.map +0 -1
- package/src/typescript-language-options.js +0 -14
package/dist/index.d.ts
CHANGED
|
@@ -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":"AAWA,wGA8FC;;qBApGoB,mBAAmB"}
|
package/dist/src/vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../../src/vue.js"],"names":[],"mappings":"AAYA,
|
|
1
|
+
{"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../../src/vue.js"],"names":[],"mappings":"AAYA,iGAgCC"}
|
package/index.js
CHANGED
package/package.json
CHANGED
package/src/typescript.js
CHANGED
|
@@ -6,7 +6,6 @@ import deprecationPlugin from 'eslint-plugin-deprecation'
|
|
|
6
6
|
import tseslint from 'typescript-eslint'
|
|
7
7
|
|
|
8
8
|
import { GLOB_JS, GLOB_JSX, GLOB_TEST, GLOB_TS, GLOB_TSX } from './shared.js'
|
|
9
|
-
import { typescriptLanguageOptions } from './typescript-language-options.js'
|
|
10
9
|
|
|
11
10
|
export { tseslint }
|
|
12
11
|
|
|
@@ -20,7 +19,15 @@ export function typescript() {
|
|
|
20
19
|
{
|
|
21
20
|
name: 'typescript',
|
|
22
21
|
files: [GLOB_TS, GLOB_TSX, GLOB_JS, GLOB_JSX],
|
|
23
|
-
languageOptions:
|
|
22
|
+
languageOptions: {
|
|
23
|
+
// @ts-expect-error: conflict type
|
|
24
|
+
parser: tseslint.parser,
|
|
25
|
+
parserOptions: {
|
|
26
|
+
project: true,
|
|
27
|
+
sourceType: 'module',
|
|
28
|
+
ecmaVersion: 'latest',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
24
31
|
plugins: {
|
|
25
32
|
// @ts-expect-error: conflict type
|
|
26
33
|
'@typescript-eslint': tseslint.plugin,
|
|
@@ -36,7 +43,8 @@ export function typescript() {
|
|
|
36
43
|
'@typescript-eslint/consistent-indexed-object-style': 'off',
|
|
37
44
|
'@typescript-eslint/array-type': 'off',
|
|
38
45
|
'@typescript-eslint/dot-notation': 'off',
|
|
39
|
-
'@typescript-eslint/no-unnecessary-parameter-property-assignment':
|
|
46
|
+
'@typescript-eslint/no-unnecessary-parameter-property-assignment':
|
|
47
|
+
'warn',
|
|
40
48
|
'@typescript-eslint/restrict-plus-operands': 'warn',
|
|
41
49
|
'@typescript-eslint/no-unsafe-call': 'warn',
|
|
42
50
|
'@typescript-eslint/no-unsafe-return': 'warn',
|
package/src/vue.js
CHANGED
|
@@ -3,24 +3,31 @@
|
|
|
3
3
|
import prettierConfig from 'eslint-config-prettier'
|
|
4
4
|
// @ts-expect-error no types
|
|
5
5
|
import pluginVue from 'eslint-plugin-vue'
|
|
6
|
+
import tseslint from 'typescript-eslint'
|
|
6
7
|
|
|
7
8
|
import { GLOB_VUE } from './shared.js'
|
|
8
|
-
import { typescriptLanguageOptions } from './typescript-language-options.js'
|
|
9
9
|
|
|
10
|
-
/** @type {import('eslint').Linter.FlatConfig} */
|
|
10
|
+
/** @type {import('eslint').Linter.FlatConfig[]} */
|
|
11
11
|
const vueRecommended = pluginVue.configs['flat/recommended']
|
|
12
12
|
|
|
13
13
|
export function vue() {
|
|
14
14
|
/** @type {import('eslint').Linter.FlatConfig[]} */
|
|
15
15
|
const config = [
|
|
16
|
+
...vueRecommended,
|
|
16
17
|
{
|
|
17
|
-
|
|
18
|
-
name: 'vue',
|
|
18
|
+
name: 'vue:language-options',
|
|
19
19
|
files: [GLOB_VUE],
|
|
20
|
-
languageOptions:
|
|
20
|
+
languageOptions: {
|
|
21
|
+
parserOptions: {
|
|
22
|
+
parser: tseslint.parser,
|
|
23
|
+
sourceType: 'module',
|
|
24
|
+
ecmaVersion: 'latest',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'vue:rules-override',
|
|
21
30
|
rules: {
|
|
22
|
-
...vueRecommended.rules,
|
|
23
|
-
|
|
24
31
|
...Object.fromEntries(
|
|
25
32
|
Object.entries(prettierConfig.rules)
|
|
26
33
|
.filter(([key]) => key.startsWith('vue/'))
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-language-options.d.ts","sourceRoot":"","sources":["../../src/typescript-language-options.js"],"names":[],"mappings":"AAIA,oEAAoE;AACpE,wCADW,OAAO,QAAQ,EAAE,MAAM,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAS/D"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
import tseslint from 'typescript-eslint'
|
|
4
|
-
|
|
5
|
-
/** @type {import('eslint').Linter.FlatConfig['languageOptions']} */
|
|
6
|
-
export const typescriptLanguageOptions = {
|
|
7
|
-
// @ts-expect-error: conflict type
|
|
8
|
-
parser: tseslint.parser,
|
|
9
|
-
parserOptions: {
|
|
10
|
-
project: true,
|
|
11
|
-
sourceType: 'module',
|
|
12
|
-
ecmaVersion: 'latest',
|
|
13
|
-
},
|
|
14
|
-
}
|