@nitra/eslint-config 2.0.16 → 2.0.18
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 +25 -2
- package/package.json +5 -1
package/index.js
CHANGED
|
@@ -2,9 +2,13 @@ import js from '@eslint/js'
|
|
|
2
2
|
// import sdlPlugin from '@microsoft/eslint-plugin-sdl'
|
|
3
3
|
import configPrettier from 'eslint-config-prettier'
|
|
4
4
|
// import configStandard from 'eslint-config-standard'
|
|
5
|
+
import jsdocPlugin from 'eslint-plugin-jsdoc'
|
|
6
|
+
import markdownPlugin from 'eslint-plugin-markdown'
|
|
5
7
|
import nodePlugin from 'eslint-plugin-n'
|
|
6
8
|
import securityPlugin from 'eslint-plugin-security'
|
|
7
|
-
import
|
|
9
|
+
import unicornPlugin from 'eslint-plugin-unicorn'
|
|
10
|
+
import vuePlugin from 'eslint-plugin-vue'
|
|
11
|
+
import eslintYmlPlugin from 'eslint-plugin-yml'
|
|
8
12
|
import globals from 'globals'
|
|
9
13
|
|
|
10
14
|
const all = [
|
|
@@ -12,7 +16,13 @@ const all = [
|
|
|
12
16
|
// До дефолтних "**/node_modules/", ".git/" додаємо
|
|
13
17
|
ignores: ['.yarn/**', '**/dist/**']
|
|
14
18
|
},
|
|
19
|
+
// Загальні правила для всіх Yaml файлів проекту
|
|
20
|
+
...eslintYmlPlugin.configs['flat/prettier'],
|
|
21
|
+
// Загальні правила для всіх MD файлів проекту
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
...markdownPlugin.configs.recommended,
|
|
15
24
|
// Загальні правила для всіх js файлів проекту
|
|
25
|
+
jsdocPlugin.configs['flat/recommended'],
|
|
16
26
|
{
|
|
17
27
|
files: ['**/*.js'],
|
|
18
28
|
languageOptions: {
|
|
@@ -27,6 +37,18 @@ const all = [
|
|
|
27
37
|
...js.configs.recommended.rules,
|
|
28
38
|
'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }]
|
|
29
39
|
}
|
|
40
|
+
},
|
|
41
|
+
// Unicorn правила
|
|
42
|
+
unicornPlugin.configs['flat/recommended'],
|
|
43
|
+
{
|
|
44
|
+
rules: {
|
|
45
|
+
'unicorn/filename-case': 'off',
|
|
46
|
+
'unicorn/no-null': 'off',
|
|
47
|
+
'unicorn/prevent-abbreviations': 'off',
|
|
48
|
+
'unicorn/no-anonymous-default-export': 'off',
|
|
49
|
+
'unicorn/prefer-ternary': 'off',
|
|
50
|
+
'unicorn/no-array-push-push': 'off'
|
|
51
|
+
}
|
|
30
52
|
}
|
|
31
53
|
]
|
|
32
54
|
// Тільки для node js проектів
|
|
@@ -62,6 +84,7 @@ const vueAllVite = [
|
|
|
62
84
|
languageOptions: {
|
|
63
85
|
globals: {
|
|
64
86
|
...globals.browser,
|
|
87
|
+
Intl: 'readonly',
|
|
65
88
|
createLogger: 'readonly',
|
|
66
89
|
gql: 'readonly',
|
|
67
90
|
$ref: 'readonly',
|
|
@@ -77,7 +100,7 @@ const vueAllVite = [
|
|
|
77
100
|
// Для Vue файлів Vue проектів
|
|
78
101
|
// files: ['**/*.vue']
|
|
79
102
|
const vue = [
|
|
80
|
-
...
|
|
103
|
+
...vuePlugin.configs['flat/recommended'],
|
|
81
104
|
{
|
|
82
105
|
rules: {
|
|
83
106
|
'vue/no-v-html': 'off',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nitra/eslint-config",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.18",
|
|
4
4
|
"description": "A Eslint shareable config for projects using 'Vue' and 'Node'",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./index.js",
|
|
@@ -16,9 +16,13 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"eslint": "^9.0.0",
|
|
18
18
|
"eslint-config-prettier": "^9.1.0",
|
|
19
|
+
"eslint-plugin-jsdoc": "^48.2.3",
|
|
20
|
+
"eslint-plugin-markdown": "^4.0.1",
|
|
19
21
|
"eslint-plugin-n": "^17.2.0",
|
|
20
22
|
"eslint-plugin-security": "^3.0.0",
|
|
23
|
+
"eslint-plugin-unicorn": "^52.0.0",
|
|
21
24
|
"eslint-plugin-vue": "^9.24.1",
|
|
25
|
+
"eslint-plugin-yml": "^1.14.0",
|
|
22
26
|
"globals": "^15.0.0"
|
|
23
27
|
},
|
|
24
28
|
"files": [
|