@ocavue/eslint-config 1.10.2 → 1.11.1

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/README.md CHANGED
@@ -21,7 +21,7 @@ You will need to use the new ["flat" ESLint configuration](https://eslint.org/do
21
21
 
22
22
  In your `eslint.config.js` file, add the following to extend the basic config:
23
23
 
24
- ```JS
24
+ ```js
25
25
  // eslint.config.js
26
26
  import { basic } from '@ocavue/eslint-config'
27
27
 
@@ -30,7 +30,7 @@ export default [...basic()]
30
30
 
31
31
  If you want to use the React config, you can do the following:
32
32
 
33
- ```JS
33
+ ```js
34
34
  // eslint.config.js
35
35
  import { basic, react } from '@ocavue/eslint-config'
36
36
 
@@ -39,7 +39,7 @@ export default [...basic(), ...react()]
39
39
 
40
40
  If you want to use the Vue config, you can do the following:
41
41
 
42
- ```JS
42
+ ```js
43
43
  // eslint.config.js
44
44
  import { basic, vue } from '@ocavue/eslint-config'
45
45
 
@@ -48,7 +48,7 @@ export default [...basic(), ...vue()]
48
48
 
49
49
  If you want to use the check the code blocks in markdown files, you can do the following:
50
50
 
51
- ```JS
51
+ ```js
52
52
  // eslint.config.js
53
53
  import { basic, markdown } from '@ocavue/eslint-config'
54
54
 
@@ -1 +1 @@
1
- {"version":3,"file":"antfu.d.ts","sourceRoot":"","sources":["../../src/antfu.js"],"names":[],"mappings":"AAEA,mGAeC"}
1
+ {"version":3,"file":"antfu.d.ts","sourceRoot":"","sources":["../../src/antfu.js"],"names":[],"mappings":"AAEA,mGAgBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"imports.d.ts","sourceRoot":"","sources":["../../src/imports.js"],"names":[],"mappings":"AAKA,qGA2CC"}
1
+ {"version":3,"file":"imports.d.ts","sourceRoot":"","sources":["../../src/imports.js"],"names":[],"mappings":"AAIA,qGA6CC"}
@@ -1 +1 @@
1
- {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/markdown.js"],"names":[],"mappings":"AAMA,sGAsBC"}
1
+ {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/markdown.js"],"names":[],"mappings":"AAMA,sGAuCC"}
@@ -1 +1 @@
1
- {"version":3,"file":"no-only-tests.d.ts","sourceRoot":"","sources":["../../src/no-only-tests.js"],"names":[],"mappings":"AAKA,yGAeC"}
1
+ {"version":3,"file":"no-only-tests.d.ts","sourceRoot":"","sources":["../../src/no-only-tests.js"],"names":[],"mappings":"AAIA,yGAeC"}
@@ -1 +1 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/react.js"],"names":[],"mappings":"AAYA,mGAiCC"}
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/react.js"],"names":[],"mappings":"AAUA,mGAiCC"}
@@ -1 +1 @@
1
- {"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../../src/vue.js"],"names":[],"mappings":"AAYA,iGAgCC"}
1
+ {"version":3,"file":"vue.d.ts","sourceRoot":"","sources":["../../src/vue.js"],"names":[],"mappings":"AAWA,iGAgCC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ocavue/eslint-config",
3
3
  "type": "module",
4
- "version": "1.10.2",
4
+ "version": "1.11.1",
5
5
  "packageManager": "pnpm@8.15.9",
6
6
  "description": "",
7
7
  "author": "ocavue <ocavue@gmail.com>",
@@ -39,7 +39,7 @@
39
39
  "eslint-import-resolver-typescript": "^3.6.1",
40
40
  "eslint-plugin-antfu": "^2.3.4",
41
41
  "eslint-plugin-deprecation": "^3.0.0",
42
- "eslint-plugin-import": "^2.29.1",
42
+ "eslint-plugin-import-x": "^3.1.0",
43
43
  "eslint-plugin-jsonc": "^2.16.0",
44
44
  "eslint-plugin-markdown": "^5.1.0",
45
45
  "eslint-plugin-no-only-tests": "^3.1.0",
package/src/antfu.js CHANGED
@@ -9,6 +9,7 @@ export function antfu() {
9
9
  antfu: antfuPlugin,
10
10
  },
11
11
  rules: {
12
+ 'antfu/import-dedupe': 'error',
12
13
  'antfu/top-level-function': 'error',
13
14
  },
14
15
  },
package/src/imports.js CHANGED
@@ -1,7 +1,6 @@
1
1
  // @ts-check
2
2
 
3
- // @ts-expect-error no type
4
- import importPlugin from 'eslint-plugin-import'
3
+ import * as importPlugin from 'eslint-plugin-import-x'
5
4
 
6
5
  export function imports() {
7
6
  /** @type {import('eslint').Linter.FlatConfig[]} */
@@ -9,6 +8,7 @@ export function imports() {
9
8
  {
10
9
  name: 'import',
11
10
  plugins: {
11
+ // @ts-expect-error incorrect type
12
12
  import: importPlugin,
13
13
  },
14
14
  settings: {
@@ -26,6 +26,7 @@ export function imports() {
26
26
  'import/no-mutable-exports': 'warn',
27
27
  'import/no-useless-path-segments': 'warn',
28
28
  'import/newline-after-import': 'warn',
29
+ 'import/no-duplicates': 'warn',
29
30
  'import/order': [
30
31
  'warn',
31
32
  {
package/src/markdown.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @ts-check
2
2
 
3
- import * as markdownPlugin from 'eslint-plugin-markdown'
3
+ import markdownPlugin from 'eslint-plugin-markdown'
4
4
 
5
5
  import { GLOB_MARKDOWN, GLOB_SRC, GLOB_VUE } from './shared.js'
6
6
 
@@ -12,11 +12,28 @@ export function markdown() {
12
12
 
13
13
  {
14
14
  files: [`${GLOB_MARKDOWN}/${GLOB_SRC}`, `${GLOB_MARKDOWN}/${GLOB_VUE}`],
15
+ languageOptions: {
16
+ parserOptions: {
17
+ project: null,
18
+ },
19
+ },
15
20
  rules: {
16
21
  '@typescript-eslint/no-redeclare': 'off',
17
22
  '@typescript-eslint/no-unused-vars': 'off',
18
23
  '@typescript-eslint/no-use-before-define': 'off',
19
24
  '@typescript-eslint/no-var-requires': 'off',
25
+ '@typescript-eslint/restrict-plus-operands': 'off',
26
+ '@typescript-eslint/no-unsafe-call': 'off',
27
+ '@typescript-eslint/no-unsafe-return': 'off',
28
+ '@typescript-eslint/no-unsafe-argument': 'off',
29
+ '@typescript-eslint/no-unsafe-member-access': 'off',
30
+ '@typescript-eslint/no-unsafe-assignment': 'off',
31
+ '@typescript-eslint/no-floating-promises': 'off',
32
+ '@typescript-eslint/no-misused-promises': 'off',
33
+ '@typescript-eslint/await-thenable': 'off',
34
+ '@typescript-eslint/unbound-method': 'off',
35
+ '@typescript-eslint/require-await': 'off',
36
+ 'deprecation/deprecation': 'off',
20
37
 
21
38
  'no-alert': 'off',
22
39
  'no-console': 'off',
@@ -1,6 +1,5 @@
1
1
  // @ts-check
2
2
 
3
- // @ts-expect-error: eslint-plugin-unicorn is not typed
4
3
  import plugin from 'eslint-plugin-no-only-tests'
5
4
 
6
5
  export function noOnlyTests() {
package/src/react.js CHANGED
@@ -1,8 +1,6 @@
1
1
  // @ts-check
2
2
 
3
- // @ts-expect-error no types
4
3
  import reactPlugin from 'eslint-plugin-react'
5
- // @ts-expect-error no types
6
4
  import reactHooksPlugin from 'eslint-plugin-react-hooks'
7
5
 
8
6
  import { GLOB_TS, GLOB_TSX } from './shared.js'
package/src/vue.js CHANGED
@@ -1,14 +1,13 @@
1
1
  // @ts-check
2
2
 
3
3
  import prettierConfig from 'eslint-config-prettier'
4
- // @ts-expect-error no types
5
- import pluginVue from 'eslint-plugin-vue'
4
+ import vuePlugin from 'eslint-plugin-vue'
6
5
  import tseslint from 'typescript-eslint'
7
6
 
8
7
  import { GLOB_VUE } from './shared.js'
9
8
 
10
9
  /** @type {import('eslint').Linter.FlatConfig[]} */
11
- const vueRecommended = pluginVue.configs['flat/recommended']
10
+ const vueRecommended = vuePlugin.configs['flat/recommended']
12
11
 
13
12
  export function vue() {
14
13
  /** @type {import('eslint').Linter.FlatConfig[]} */