@vidispine/eslint-config-base 21.3.0 → 22.1.0-pre.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 +1 -1
- package/index.js +59 -7
- package/package.json +12 -9
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Add js eslint config
|
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
|
-
1. Add **@vidispine/eslint-config** and **eslint (7.x)** as devDependencies,
|
|
7
|
+
1. Add **@vidispine/eslint-config-base** and **eslint (7.x)** as devDependencies,
|
|
8
8
|
2. Extend config in package.json or equivalent file, e.g.:
|
|
9
9
|
|
|
10
10
|
```json
|
package/index.js
CHANGED
|
@@ -1,26 +1,78 @@
|
|
|
1
|
+
const prettierConfig = require('@vidispine/prettier-config');
|
|
2
|
+
|
|
1
3
|
module.exports = {
|
|
2
4
|
extends: ['airbnb-base', 'plugin:prettier/recommended'],
|
|
3
|
-
ignorePatterns: ['
|
|
5
|
+
ignorePatterns: ['node_modules/', 'dist/', 'build/'],
|
|
4
6
|
rules: {
|
|
7
|
+
'prettier/prettier': ['error', prettierConfig],
|
|
5
8
|
'import/no-extraneous-dependencies': [
|
|
6
9
|
'error',
|
|
7
10
|
{
|
|
8
11
|
devDependencies: true,
|
|
9
12
|
},
|
|
10
13
|
],
|
|
11
|
-
'
|
|
14
|
+
'import/order': [
|
|
12
15
|
'error',
|
|
13
16
|
{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
groups: [
|
|
18
|
+
'builtin',
|
|
19
|
+
'external',
|
|
20
|
+
'parent',
|
|
21
|
+
'sibling',
|
|
22
|
+
'internal',
|
|
23
|
+
'index',
|
|
24
|
+
'object',
|
|
25
|
+
'type',
|
|
26
|
+
'unknown',
|
|
27
|
+
],
|
|
28
|
+
pathGroups: [
|
|
29
|
+
{
|
|
30
|
+
pattern: '@vidispine/**',
|
|
31
|
+
group: 'external',
|
|
32
|
+
position: 'after',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
alphabetize: { order: 'asc', caseInsensitive: true },
|
|
36
|
+
'newlines-between': 'always',
|
|
17
37
|
},
|
|
18
38
|
],
|
|
19
|
-
'max-len': 'off', // Let prettier decide
|
|
20
39
|
},
|
|
40
|
+
overrides: [
|
|
41
|
+
{
|
|
42
|
+
files: ['*.md'],
|
|
43
|
+
extends: ['plugin:mdx/recommended'],
|
|
44
|
+
rules: {
|
|
45
|
+
'prettier/prettier': [
|
|
46
|
+
2,
|
|
47
|
+
{
|
|
48
|
+
parser: 'markdown',
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
files: ['**/*.md/**'],
|
|
55
|
+
extends: ['plugin:mdx/code-blocks'],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
// Note: mdx/jsx could not be overridden in config-react, so sneaked in here
|
|
59
|
+
files: ['**/*.{md,mdx}/*.{js,jsx}'],
|
|
60
|
+
rules: {
|
|
61
|
+
'no-console': 'off',
|
|
62
|
+
'no-undef': 'off',
|
|
63
|
+
'no-unused-expressions': 'off',
|
|
64
|
+
'no-unused-vars': 'off',
|
|
65
|
+
'padded-blocks': 'off',
|
|
66
|
+
'import/no-extraneous-dependencies': 'off',
|
|
67
|
+
'import/no-duplicates': 'off',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
],
|
|
21
71
|
env: {
|
|
22
72
|
browser: true,
|
|
23
73
|
jest: true,
|
|
24
74
|
},
|
|
25
|
-
|
|
75
|
+
parserOptions: {
|
|
76
|
+
ecmaVersion: 2020,
|
|
77
|
+
},
|
|
26
78
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vidispine/eslint-config-base",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.1.0-pre.1",
|
|
4
4
|
"homepage": "https://github.com/vidispine/vdt#readme",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"main": "index.js",
|
|
@@ -18,21 +18,24 @@
|
|
|
18
18
|
"build": "echo 'No build script'"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"
|
|
22
|
-
"eslint-config-
|
|
23
|
-
"eslint-
|
|
24
|
-
"eslint-plugin-
|
|
21
|
+
"@vidispine/prettier-config": "^22.1.0-pre.1",
|
|
22
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
23
|
+
"eslint-config-prettier": "^8.3.0",
|
|
24
|
+
"eslint-plugin-import": "^2.25.4",
|
|
25
|
+
"eslint-plugin-mdx": "^1.16.0",
|
|
26
|
+
"eslint-plugin-prettier": "^4.0.0"
|
|
25
27
|
},
|
|
26
28
|
"peerDependencies": {
|
|
27
|
-
"eslint": "7.
|
|
29
|
+
"eslint": "^7.0.0 || ^8.0.0"
|
|
28
30
|
},
|
|
29
31
|
"devDependencies": {
|
|
30
|
-
"prettier": "2.
|
|
32
|
+
"prettier": "^2.5.1"
|
|
31
33
|
},
|
|
32
34
|
"eslintConfig": {
|
|
33
35
|
"extends": [
|
|
34
36
|
"@vidispine/eslint-config-base"
|
|
35
37
|
]
|
|
36
38
|
},
|
|
37
|
-
"prettier": "@vidispine/prettier-config"
|
|
38
|
-
|
|
39
|
+
"prettier": "@vidispine/prettier-config",
|
|
40
|
+
"gitHead": "9e1d15560719544a68e6bc881e1a40901fe9f786"
|
|
41
|
+
}
|