@nitra/eslint-config 2.1.1 → 2.2.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.
Files changed (2) hide show
  1. package/index.js +14 -3
  2. package/package.json +9 -7
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import js from '@eslint/js'
2
1
  // import sdlPlugin from '@microsoft/eslint-plugin-sdl'
2
+ import js from '@eslint/js'
3
3
  import configPrettier from 'eslint-config-prettier'
4
- // import configStandard from 'eslint-config-standard'
4
+ import importPlugin from 'eslint-plugin-import'
5
5
  import jsdocPlugin from 'eslint-plugin-jsdoc'
6
6
  import markdownPlugin from 'eslint-plugin-markdown'
7
7
  import nodePlugin from 'eslint-plugin-n'
@@ -10,6 +10,7 @@ import unicornPlugin from 'eslint-plugin-unicorn'
10
10
  import vuePlugin from 'eslint-plugin-vue'
11
11
  import eslintYmlPlugin from 'eslint-plugin-yml'
12
12
  import globals from 'globals'
13
+ // import configStandard from 'eslint-config-standard'
13
14
 
14
15
  const all = [
15
16
  {
@@ -21,13 +22,23 @@ const all = [
21
22
  // Загальні правила для всіх MD файлів проекту
22
23
  // @ts-ignore
23
24
  ...markdownPlugin.configs.recommended,
25
+ // Плагин eslint-plugin-import
26
+ importPlugin.flatConfigs.recommended,
27
+ {
28
+ rules: {
29
+ 'import/no-unresolved': 'off', // не працює з monorepo та #alias
30
+ 'import/newline-after-import': ['error', { count: 1 }],
31
+ 'import/order': ['error', { warnOnUnassignedImports: true }],
32
+ 'import/no-useless-path-segments': ['error', { noUselessIndex: false }]
33
+ }
34
+ },
24
35
  // Загальні правила для всіх js файлів проекту
25
36
  jsdocPlugin.configs['flat/recommended'],
26
37
  configPrettier,
27
38
  {
28
39
  files: ['**/*.js'],
29
40
  languageOptions: {
30
- ecmaVersion: 13,
41
+ ecmaVersion: 'latest',
31
42
  sourceType: 'module'
32
43
  },
33
44
  rules: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nitra/eslint-config",
3
- "version": "2.1.1",
3
+ "version": "2.2.1",
4
4
  "description": "A Eslint shareable config for projects using 'Vue' and 'Node'",
5
5
  "type": "module",
6
6
  "exports": "./index.js",
@@ -14,16 +14,18 @@
14
14
  "eslintconfig"
15
15
  ],
16
16
  "dependencies": {
17
- "eslint": "^9.8.0",
17
+ "@eslint/js": "^9.12.0",
18
+ "eslint": "^9.12.0",
18
19
  "eslint-config-prettier": "^9.1.0",
19
- "eslint-plugin-jsdoc": "^48.10.2",
20
+ "eslint-plugin-import": "^2.31.0",
21
+ "eslint-plugin-jsdoc": "^50.3.1",
20
22
  "eslint-plugin-markdown": "^5.1.0",
21
- "eslint-plugin-n": "^17.10.1",
23
+ "eslint-plugin-n": "^17.10.3",
22
24
  "eslint-plugin-security": "^3.0.1",
23
- "eslint-plugin-unicorn": "^55.0.0",
24
- "eslint-plugin-vue": "^9.27.0",
25
+ "eslint-plugin-unicorn": "^56.0.0",
26
+ "eslint-plugin-vue": "^9.28.0",
25
27
  "eslint-plugin-yml": "^1.14.0",
26
- "globals": "^15.8.0"
28
+ "globals": "^15.10.0"
27
29
  },
28
30
  "files": [
29
31
  "index.js"