@nitra/eslint-config 1.0.39 → 2.0.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 +46 -12
- package/package.json +7 -13
- package/node.js +0 -29
- package/vue.js +0 -53
- package/vue2.js +0 -40
package/index.js
CHANGED
|
@@ -1,13 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import configPrettier from 'eslint-config-prettier'
|
|
2
|
+
import configStandard from 'eslint-config-standard'
|
|
3
|
+
import sdlPlugin from '@microsoft/eslint-plugin-sdl'
|
|
4
|
+
import securityPlugin from 'eslint-plugin-security'
|
|
5
|
+
import nodePlugin from 'eslint-plugin-n'
|
|
6
|
+
import pluginVue from 'eslint-plugin-vue'
|
|
7
|
+
import js from '@eslint/js'
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
all: [
|
|
11
|
+
{
|
|
12
|
+
// До дефолтних "**/node_modules/", ".git/" додаємо
|
|
13
|
+
ignores: ['.yarn/**', 'dist/**']
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
files: ['**/*.js'],
|
|
17
|
+
languageOptions: {
|
|
18
|
+
ecmaVersion: 13,
|
|
19
|
+
sourceType: 'module'
|
|
20
|
+
},
|
|
21
|
+
plugins: {
|
|
22
|
+
prettier: configPrettier,
|
|
23
|
+
standard: configStandard
|
|
24
|
+
},
|
|
25
|
+
rules: {
|
|
26
|
+
...js.configs.recommended.rules
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
node: [
|
|
31
|
+
nodePlugin.configs['flat/recommended-module'],
|
|
32
|
+
securityPlugin.configs.recommended,
|
|
33
|
+
{ plugins: { '@microsoft/eslint-plugin-sdl': sdlPlugin } }
|
|
34
|
+
],
|
|
35
|
+
vue: [...pluginVue.configs['flat/recommended']]
|
|
13
36
|
}
|
|
37
|
+
|
|
38
|
+
// const nodeConfig = sharableConfig.configs.node.map(configObject => ({
|
|
39
|
+
// files: ['run/**/*.js'],
|
|
40
|
+
// ...configObject
|
|
41
|
+
// }))
|
|
42
|
+
// const vueConfig = sharableConfig.configs.vue.map(configObject => ({
|
|
43
|
+
// files: ['site/**/*.vue'],
|
|
44
|
+
// ...configObject
|
|
45
|
+
// }))
|
|
46
|
+
|
|
47
|
+
// export default [...sharableConfig.configs.all, ...nodeConfig, ...vueConfig]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nitra/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A Eslint shareable config for projects using 'Vue' and 'Node'",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,21 +13,15 @@
|
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@microsoft/eslint-plugin-sdl": "^0.2.2",
|
|
16
|
-
"eslint": "^
|
|
17
|
-
"eslint-config-prettier": "^9.
|
|
16
|
+
"eslint": "^9.0.0",
|
|
17
|
+
"eslint-config-prettier": "^9.1.0",
|
|
18
18
|
"eslint-config-standard": "^17.1.0",
|
|
19
|
-
"eslint-plugin-
|
|
20
|
-
"eslint-plugin-
|
|
21
|
-
"eslint-plugin-
|
|
22
|
-
"eslint-plugin-promise": "^6.1.1",
|
|
23
|
-
"eslint-plugin-security": "^1.7.1",
|
|
24
|
-
"eslint-plugin-vue": "^9.18.1"
|
|
19
|
+
"eslint-plugin-n": "^17.2.0",
|
|
20
|
+
"eslint-plugin-security": "^3.0.0",
|
|
21
|
+
"eslint-plugin-vue": "^9.24.1"
|
|
25
22
|
},
|
|
26
23
|
"files": [
|
|
27
|
-
"index.js"
|
|
28
|
-
"node.js",
|
|
29
|
-
"vue.js",
|
|
30
|
-
"vue2.js"
|
|
24
|
+
"index.js"
|
|
31
25
|
],
|
|
32
26
|
"license": "AGPL-3.0-or-later"
|
|
33
27
|
}
|
package/node.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
parserOptions: {
|
|
3
|
-
ecmaVersion: 13,
|
|
4
|
-
sourceType: 'module'
|
|
5
|
-
},
|
|
6
|
-
env: {
|
|
7
|
-
node: true
|
|
8
|
-
},
|
|
9
|
-
plugins: ['security', '@microsoft/sdl'],
|
|
10
|
-
extends: [
|
|
11
|
-
'standard',
|
|
12
|
-
'eslint:recommended',
|
|
13
|
-
'plugin:n/recommended-module',
|
|
14
|
-
'prettier',
|
|
15
|
-
'plugin:security/recommended',
|
|
16
|
-
'plugin:@microsoft/sdl/node'
|
|
17
|
-
],
|
|
18
|
-
rules: {
|
|
19
|
-
'security/detect-non-literal-fs-filename': 'off',
|
|
20
|
-
'security/detect-possible-timing-attacks': 'off',
|
|
21
|
-
'security/detect-object-injection': 'off',
|
|
22
|
-
camelcase: 'off',
|
|
23
|
-
'@microsoft/sdl/no-cookies': 'off',
|
|
24
|
-
'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }]
|
|
25
|
-
},
|
|
26
|
-
globals: {
|
|
27
|
-
fetch: 'readonly'
|
|
28
|
-
}
|
|
29
|
-
}
|
package/vue.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
parserOptions: {
|
|
3
|
-
ecmaVersion: 13,
|
|
4
|
-
sourceType: 'module'
|
|
5
|
-
},
|
|
6
|
-
env: {
|
|
7
|
-
browser: true
|
|
8
|
-
},
|
|
9
|
-
plugins: ['vue', '@microsoft/sdl'],
|
|
10
|
-
extends: [
|
|
11
|
-
'standard',
|
|
12
|
-
'eslint:recommended',
|
|
13
|
-
'plugin:vue/vue3-strongly-recommended',
|
|
14
|
-
'prettier',
|
|
15
|
-
'plugin:@microsoft/sdl/common'
|
|
16
|
-
],
|
|
17
|
-
rules: {
|
|
18
|
-
'vue/multi-word-component-names': 'off',
|
|
19
|
-
'vue/no-setup-props-destructure': 'off',
|
|
20
|
-
camelcase: 'off',
|
|
21
|
-
'@microsoft/sdl/no-cookies': 'off',
|
|
22
|
-
'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }]
|
|
23
|
-
},
|
|
24
|
-
globals: {
|
|
25
|
-
localStorage: 'readonly',
|
|
26
|
-
createLogger: 'readonly',
|
|
27
|
-
gql: 'readonly',
|
|
28
|
-
defineProps: 'readonly',
|
|
29
|
-
defineEmits: 'readonly',
|
|
30
|
-
defineSlots: 'readonly',
|
|
31
|
-
defineModel: 'readonly',
|
|
32
|
-
toRef: 'readonly',
|
|
33
|
-
toValue: 'readonly',
|
|
34
|
-
defineOptions: 'readonly',
|
|
35
|
-
useI18n: 'readonly',
|
|
36
|
-
computed: 'readonly',
|
|
37
|
-
onBeforeMount: 'readonly',
|
|
38
|
-
onMounted: 'readonly',
|
|
39
|
-
onUnmounted: 'readonly',
|
|
40
|
-
watchEffect: 'readonly',
|
|
41
|
-
watch: 'readonly',
|
|
42
|
-
WebSocket: 'readonly',
|
|
43
|
-
$ref: 'readonly',
|
|
44
|
-
ref: 'readonly',
|
|
45
|
-
$computed: 'readonly',
|
|
46
|
-
useRouter: 'readonly',
|
|
47
|
-
useRoute: 'readonly',
|
|
48
|
-
useMutation: 'readonly',
|
|
49
|
-
useQuery: 'readonly',
|
|
50
|
-
useSubscription: 'readonly',
|
|
51
|
-
reactive: 'readonly'
|
|
52
|
-
}
|
|
53
|
-
}
|
package/vue2.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
parserOptions: {
|
|
3
|
-
ecmaVersion: 'latest',
|
|
4
|
-
sourceType: 'module'
|
|
5
|
-
},
|
|
6
|
-
env: {
|
|
7
|
-
browser: true
|
|
8
|
-
},
|
|
9
|
-
plugins: ['vue', '@microsoft/sdl'],
|
|
10
|
-
extends: [
|
|
11
|
-
'standard',
|
|
12
|
-
'eslint:recommended',
|
|
13
|
-
'plugin:vue/strongly-recommended',
|
|
14
|
-
'prettier',
|
|
15
|
-
'plugin:@microsoft/sdl/common'
|
|
16
|
-
],
|
|
17
|
-
rules: {
|
|
18
|
-
'vue/multi-word-component-names': 'off',
|
|
19
|
-
camelcase: 'off',
|
|
20
|
-
'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }]
|
|
21
|
-
},
|
|
22
|
-
globals: {
|
|
23
|
-
localStorage: 'readonly',
|
|
24
|
-
createLogger: 'readonly',
|
|
25
|
-
gql: 'readonly',
|
|
26
|
-
defineProps: 'readonly',
|
|
27
|
-
defineEmits: 'readonly',
|
|
28
|
-
useI18n: 'readonly',
|
|
29
|
-
computed: 'readonly',
|
|
30
|
-
watchEffect: 'readonly',
|
|
31
|
-
ref: 'readonly',
|
|
32
|
-
onMounted: 'readonly',
|
|
33
|
-
onUnmounted: 'readonly',
|
|
34
|
-
useRouter: 'readonly',
|
|
35
|
-
useMutation: 'readonly',
|
|
36
|
-
useQuery: 'readonly',
|
|
37
|
-
useSubscription: 'readonly',
|
|
38
|
-
reactive: 'readonly'
|
|
39
|
-
}
|
|
40
|
-
}
|