@nitra/eslint-config 2.1.0 → 2.2.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/index.js +14 -3
- package/package.json +11 -9
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
|
-
|
|
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,7 +10,9 @@ 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
|
|
|
15
|
+
// console.log(importPlugin.flatConfigs)
|
|
14
16
|
const all = [
|
|
15
17
|
{
|
|
16
18
|
// До дефолтних "**/node_modules/", ".git/" додаємо
|
|
@@ -21,13 +23,22 @@ const all = [
|
|
|
21
23
|
// Загальні правила для всіх MD файлів проекту
|
|
22
24
|
// @ts-ignore
|
|
23
25
|
...markdownPlugin.configs.recommended,
|
|
26
|
+
// Плагин eslint-plugin-import
|
|
27
|
+
importPlugin.flatConfigs.recommended,
|
|
28
|
+
{
|
|
29
|
+
rules: {
|
|
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:
|
|
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.
|
|
3
|
+
"version": "2.2.0",
|
|
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.
|
|
17
|
+
"@eslint/js": "^9.12.0",
|
|
18
|
+
"eslint": "^9.12.0",
|
|
18
19
|
"eslint-config-prettier": "^9.1.0",
|
|
19
|
-
"eslint-plugin-
|
|
20
|
-
"eslint-plugin-
|
|
21
|
-
"eslint-plugin-
|
|
22
|
-
"eslint-plugin-
|
|
23
|
-
"eslint-plugin-
|
|
24
|
-
"eslint-plugin-
|
|
20
|
+
"eslint-plugin-import": "^2.31.0",
|
|
21
|
+
"eslint-plugin-jsdoc": "^50.3.1",
|
|
22
|
+
"eslint-plugin-markdown": "^5.1.0",
|
|
23
|
+
"eslint-plugin-n": "^17.10.3",
|
|
24
|
+
"eslint-plugin-security": "^3.0.1",
|
|
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.
|
|
28
|
+
"globals": "^15.10.0"
|
|
27
29
|
},
|
|
28
30
|
"files": [
|
|
29
31
|
"index.js"
|