@soleil-se/eslint-config 3.0.0 → 3.1.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/CHANGELOG.md +13 -0
- package/README.md +6 -8
- package/docs/structure.md +14 -23
- package/package.json +2 -2
- package/shared/client.js +2 -1
- package/shared/server.js +2 -0
- package/shared/universal.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ Alla förändringar i detta repository antecknas här.
|
|
|
5
5
|
Formatet baseras på [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
och projektet använder [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.1.0] - 2022-04-11
|
|
9
|
+
|
|
10
|
+
### Ändrat
|
|
11
|
+
|
|
12
|
+
- Tillåt användning av `console.error()` - för använding i exempelvis try catch.
|
|
13
|
+
|
|
14
|
+
## [3.0.1] - 2022-02-07
|
|
15
|
+
|
|
16
|
+
### Ändrat
|
|
17
|
+
|
|
18
|
+
- Ignorera `import/no-unresolved` för importer som börjar med `@sitevision/api/server`,
|
|
19
|
+
`@sitevision/api/common` och `@sitevision/api/client` då alla API:er inte finns dokumenterade.
|
|
20
|
+
|
|
8
21
|
## [3.0.0] - 2022-02-07
|
|
9
22
|
|
|
10
23
|
### Ändrat
|
package/README.md
CHANGED
|
@@ -52,17 +52,17 @@ Om man stöter på ett fel man inte förstår kan man kolla i styleguiden eller
|
|
|
52
52
|
## Installera
|
|
53
53
|
|
|
54
54
|
Installera konfigurationen, eslint och de plugins som behövs plugins i ditt projekt genom att köra:
|
|
55
|
-
`yarn add @soleil-se/eslint-config-sitevision eslint@^
|
|
55
|
+
`yarn add @soleil-se/eslint-config-sitevision eslint@^8.0.0 eslint-config-airbnb-base@^15.0.0 eslint-plugin-import@^2.0.0 --dev`
|
|
56
56
|
|
|
57
57
|
### Svelte
|
|
58
58
|
|
|
59
59
|
Om Svelte används i projektet:
|
|
60
|
-
`yarn add eslint-plugin-svelte3@^3 svelte@^3 svelte-preprocess@^4 --dev`
|
|
60
|
+
`yarn add eslint-plugin-svelte3@^3.0.0 svelte@^3.0.0 svelte-preprocess@^4.0.0 --dev`
|
|
61
61
|
|
|
62
62
|
### Vue
|
|
63
63
|
|
|
64
64
|
Om Vue används i projektet:
|
|
65
|
-
`yarn add eslint-plugin-vue@^7 vue-eslint-parser@^7 --dev`
|
|
65
|
+
`yarn add eslint-plugin-vue@^7.0.0 vue-eslint-parser@^7.0.0 --dev`
|
|
66
66
|
|
|
67
67
|
## Uppgradera 2.x.x -> 3.x.x
|
|
68
68
|
|
|
@@ -320,7 +320,7 @@ Exempelvis om det ligger i mappen `@next`:
|
|
|
320
320
|
|
|
321
321
|
## CLI
|
|
322
322
|
|
|
323
|
-
Om man vill köra ESLint i sin
|
|
323
|
+
Om man vill köra ESLint i sin terminal.
|
|
324
324
|
<https://eslint.org/docs/user-guide/command-line-interface>
|
|
325
325
|
|
|
326
326
|
## Svelte
|
|
@@ -373,9 +373,7 @@ const preprocess = require('svelte-preprocess');
|
|
|
373
373
|
|
|
374
374
|
module.exports = {
|
|
375
375
|
preprocess: preprocess({
|
|
376
|
-
scss: {
|
|
377
|
-
includePaths: [`${process.cwd()}/client_src/sass`],
|
|
378
|
-
},
|
|
376
|
+
scss: { includePaths: [`${__dirname}/client_src/sass`, `${__dirname}/../../../../client_src/sass`] },
|
|
379
377
|
postcss: false,
|
|
380
378
|
}),
|
|
381
379
|
};
|
|
@@ -390,7 +388,7 @@ const preprocess = require('svelte-preprocess');
|
|
|
390
388
|
module.exports = {
|
|
391
389
|
preprocess: preprocess({
|
|
392
390
|
less: {
|
|
393
|
-
paths: ['./client_src/less'],
|
|
391
|
+
paths: ['./client_src/less', '../../../../client_src/less'],
|
|
394
392
|
},
|
|
395
393
|
postcss: false,
|
|
396
394
|
}),
|
package/docs/structure.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# Projectstruktur
|
|
2
|
+
|
|
2
3
|
Här finns exempel var konfigurationsfilerna bör ligga.
|
|
3
4
|
|
|
4
5
|
<!-- TOC -->
|
|
@@ -10,25 +11,17 @@ Här finns exempel var konfigurationsfilerna bör ligga.
|
|
|
10
11
|
<!-- /TOC -->
|
|
11
12
|
|
|
12
13
|
## Global
|
|
13
|
-
|
|
14
|
+
|
|
15
|
+
Ett projekt som kör `@soleil/sv-gulp-build@^3.0.0` eller `@soleil/sv-project-build` och inläsning global config.
|
|
16
|
+
|
|
14
17
|
```
|
|
15
18
|
<sitevision_projekt>
|
|
16
19
|
|
|
|
17
20
|
+---- server_src
|
|
18
21
|
| |
|
|
19
22
|
| +---- snippets
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
| |
|
|
23
|
-
| +---- webapps
|
|
24
|
-
| |
|
|
25
|
-
| +---- apps
|
|
26
|
-
| |
|
|
27
|
-
| +---- App
|
|
28
|
-
| |
|
|
29
|
-
| +---- src
|
|
30
|
-
| |
|
|
31
|
-
| +---- .eslintrc.js (@soleil/eslint-config-sitevision/server-legacy)
|
|
23
|
+
| |
|
|
24
|
+
| +---- .eslintrc.js (@soleil/eslint-config-sitevision/server-legacy)
|
|
32
25
|
|
|
|
33
26
|
+---- .eslintrc.js (@soleil/eslint-config-sitevision/global)
|
|
34
27
|
|
|
@@ -37,19 +30,20 @@ Ett projekt som kör `@soleil/sv-gulp-build@^3.0.0` och inläsning global config
|
|
|
37
30
|
## WebApp
|
|
38
31
|
|
|
39
32
|
I en fristående WebApp.
|
|
33
|
+
|
|
40
34
|
```
|
|
41
35
|
MyWebApp
|
|
42
36
|
|
|
|
43
|
-
+----
|
|
44
|
-
|
|
|
45
|
-
+---- app_src
|
|
37
|
+
+---- src
|
|
46
38
|
|
|
|
47
39
|
+---- .eslintrc.js (@soleil/eslint-config-sitevision/webapp)
|
|
48
40
|
|
|
49
41
|
```
|
|
42
|
+
|
|
50
43
|
## Enskilda filer
|
|
51
44
|
|
|
52
|
-
Ett projekt som kör `@soleil/sv-gulp-build@^3.0.0` och inläsning av enskilda config-filer.
|
|
45
|
+
Ett projekt som kör `@soleil/sv-gulp-build@^3.0.0` eller `@soleil/sv-project-build` och inläsning av enskilda config-filer.
|
|
46
|
+
|
|
53
47
|
```
|
|
54
48
|
<sitevision_projekt>
|
|
55
49
|
|
|
|
@@ -85,16 +79,13 @@ Ett projekt som kör `@soleil/sv-gulp-build@^3.0.0` och inläsning av enskilda c
|
|
|
85
79
|
|
|
|
86
80
|
+---- apps
|
|
87
81
|
|
|
|
88
|
-
+---- App
|
|
89
|
-
|
|
|
90
|
-
+---- src
|
|
91
|
-
| |
|
|
92
|
-
| +---- .eslintrc.js (@soleil/eslint-config-sitevision/server-legacy)
|
|
82
|
+
+---- App
|
|
93
83
|
|
|
|
94
84
|
+---- .eslintrc.js (@soleil/eslint-config-sitevision/webapp)
|
|
95
|
-
```
|
|
85
|
+
```
|
|
96
86
|
|
|
97
87
|
Ett projekt som kör `@soleil/sv-gulp-build@^2.0.0`
|
|
88
|
+
|
|
98
89
|
```
|
|
99
90
|
<sitevision_projekt>
|
|
100
91
|
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soleil-se/eslint-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Settings for ESLint in a SiteVision project",
|
|
5
5
|
"author": "Soleil AB",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"private": false,
|
|
8
|
-
"homepage": "https://
|
|
8
|
+
"homepage": "https://docs.soleilit.se/03.packages/@soleil&@soleil-se/eslint-config",
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"eslint": "^8.8.0",
|
|
11
11
|
"eslint-config-airbnb-base": "^15.0.0",
|
package/shared/client.js
CHANGED
|
@@ -19,7 +19,7 @@ module.exports = {
|
|
|
19
19
|
props: true,
|
|
20
20
|
ignorePropertyModificationsFor: ['state'],
|
|
21
21
|
}],
|
|
22
|
-
'import/no-unresolved': [2, { ignore: ['#'] }],
|
|
22
|
+
'import/no-unresolved': [2, { ignore: ['#', '@sitevision/api/common', '@sitevision/api/client'] }],
|
|
23
23
|
'import/prefer-default-export': 0,
|
|
24
24
|
'object-curly-newline': ['error', {
|
|
25
25
|
ObjectExpression: { minProperties: 8, multiline: true, consistent: true },
|
|
@@ -27,5 +27,6 @@ module.exports = {
|
|
|
27
27
|
ImportDeclaration: { minProperties: 8, multiline: true, consistent: true },
|
|
28
28
|
ExportDeclaration: { minProperties: 8, multiline: true, consistent: true },
|
|
29
29
|
}],
|
|
30
|
+
'no-console': [1, { allow: ['error'] }],
|
|
30
31
|
},
|
|
31
32
|
};
|
package/shared/server.js
CHANGED
|
@@ -21,6 +21,7 @@ module.exports = {
|
|
|
21
21
|
json: 'always',
|
|
22
22
|
},
|
|
23
23
|
}],
|
|
24
|
+
'import/no-unresolved': [2, { ignore: ['#', '@sitevision/api/server', '@sitevision/api/common'] }],
|
|
24
25
|
'import/prefer-default-export': 0,
|
|
25
26
|
'object-curly-newline': ['error', {
|
|
26
27
|
ObjectExpression: { minProperties: 8, multiline: true, consistent: true },
|
|
@@ -28,5 +29,6 @@ module.exports = {
|
|
|
28
29
|
ImportDeclaration: { minProperties: 8, multiline: true, consistent: true },
|
|
29
30
|
ExportDeclaration: { minProperties: 8, multiline: true, consistent: true },
|
|
30
31
|
}],
|
|
32
|
+
'no-console': [1, { allow: ['error'] }],
|
|
31
33
|
},
|
|
32
34
|
};
|
package/shared/universal.js
CHANGED
|
@@ -21,7 +21,7 @@ module.exports = {
|
|
|
21
21
|
props: true,
|
|
22
22
|
ignorePropertyModificationsFor: ['state'],
|
|
23
23
|
}],
|
|
24
|
-
'import/no-unresolved': [2, { ignore: ['#'] }],
|
|
24
|
+
'import/no-unresolved': [2, { ignore: ['#', '@sitevision/api/server', '@sitevision/api/common', '@sitevision/api/client'] }],
|
|
25
25
|
'import/prefer-default-export': 0,
|
|
26
26
|
'object-curly-newline': ['error', {
|
|
27
27
|
ObjectExpression: { minProperties: 8, multiline: true, consistent: true },
|
|
@@ -29,5 +29,6 @@ module.exports = {
|
|
|
29
29
|
ImportDeclaration: { minProperties: 8, multiline: true, consistent: true },
|
|
30
30
|
ExportDeclaration: { minProperties: 8, multiline: true, consistent: true },
|
|
31
31
|
}],
|
|
32
|
+
'no-console': [1, { allow: ['error'] }],
|
|
32
33
|
},
|
|
33
34
|
};
|