@soleil-se/eslint-config 6.0.1 → 6.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 +73 -64
- package/README.md +1 -1
- package/index.js +1 -1
- package/package.json +9 -4
- package/rules/js/style.js +1 -1
- package/{script-module-config.js → script-module.js} +3 -2
- package/setup.js +3 -3
- /package/{prettier-config.js → prettier.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,188 +2,197 @@
|
|
|
2
2
|
title: Changelog
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
All changes in this repository are noted here.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
8
|
+
and the project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
9
|
+
|
|
10
|
+
## [6.1.0] - 2025-03-18
|
|
11
|
+
|
|
12
|
+
* Adjust config for script modules to correct sourceType.
|
|
13
|
+
* Allow `underscore-dangle` for `__rekai`.
|
|
14
|
+
|
|
15
|
+
## [6.0.2] - 2025-02-07
|
|
16
|
+
|
|
17
|
+
* Update definitions in package.json.
|
|
9
18
|
|
|
10
19
|
## [6.0.1] - 2025-02-05
|
|
11
20
|
|
|
12
|
-
*
|
|
13
|
-
*
|
|
21
|
+
* Load Svelte configuration dynamically.
|
|
22
|
+
* Update references for publishing on npm.
|
|
14
23
|
|
|
15
24
|
## [6.0.0] - 2025-02-04
|
|
16
25
|
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
26
|
+
* Update to ESLint 9 and format configuration files to flat config.
|
|
27
|
+
* Change `trailingComma` to 'all' in the Prettier configuration.
|
|
28
|
+
* Add global for `envision`.
|
|
29
|
+
* Renamed `legacy` to `script-module-config` as that is what it is used for.
|
|
21
30
|
|
|
22
31
|
## [5.3.2] - 2024-12-13
|
|
23
32
|
|
|
24
|
-
*
|
|
33
|
+
* Turn off the rule `svelte/no-unused-svelte-ignore` as it causes issues.
|
|
25
34
|
|
|
26
35
|
## [5.3.1] - 2024-11-15
|
|
27
36
|
|
|
28
|
-
*
|
|
37
|
+
* Remove `svelte-preprocess` from the installation script as it is not relevant for eslint.
|
|
29
38
|
|
|
30
39
|
## [5.3.0] - 2024-10-21
|
|
31
40
|
|
|
32
|
-
*
|
|
41
|
+
* Adjust rules for `prefer-const` and `max-len` to work better with Svelte 5.
|
|
33
42
|
|
|
34
43
|
## [5.2.0] - 2024-06-03
|
|
35
44
|
|
|
36
|
-
*
|
|
45
|
+
* New command to install dependencies and create configuration files, `npx @soleil/eslint-config --setup`.
|
|
37
46
|
|
|
38
47
|
## [5.1.2] - 2023-10-26
|
|
39
48
|
|
|
40
|
-
-
|
|
49
|
+
- Update settings for `max-len` in Svelte files as it conflicts with prettier.
|
|
41
50
|
|
|
42
51
|
## [5.1.1] - 2023-08-22
|
|
43
52
|
|
|
44
|
-
-
|
|
53
|
+
- Add exceptions for Svelte's submodules as the import plugin cannot resolve these even though they are available.
|
|
45
54
|
|
|
46
55
|
## [5.1.0] - 2023-06-01
|
|
47
56
|
|
|
48
|
-
-
|
|
57
|
+
- Add warnings for APIs whose instances should not be imported directly but created via other APIs.
|
|
49
58
|
|
|
50
59
|
## [5.0.1] - 2023-05-31
|
|
51
60
|
|
|
52
|
-
-
|
|
61
|
+
- Ignore `max-len` for imports in style tags in Svelte components.
|
|
53
62
|
|
|
54
63
|
## [5.0.0] - 2023-05-26
|
|
55
64
|
|
|
56
|
-
-
|
|
65
|
+
- New plugin for linting Svelte.
|
|
57
66
|
|
|
58
67
|
## [4.0.1] - 2023-03-27
|
|
59
68
|
|
|
60
|
-
-
|
|
69
|
+
- Only load overrides for Svelte files when Svelte is installed in the project.
|
|
61
70
|
|
|
62
71
|
## [4.0.0] - 2022-06-22
|
|
63
72
|
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
73
|
+
- Simplify by removing the different configurations and using the same config for everything except legacy code.
|
|
74
|
+
- Modernize the legacy configuration to allow limited use of ES2015+ supported by Rhino.
|
|
75
|
+
- Use `eslint-config-prettier` in Svelte components to avoid conflicts with ESLint.
|
|
76
|
+
- Remove support for Vue.
|
|
68
77
|
|
|
69
78
|
## [3.1.0] - 2022-04-11
|
|
70
79
|
|
|
71
|
-
-
|
|
80
|
+
- Allow the use of `console.error()` - for example, in try catch.
|
|
72
81
|
|
|
73
82
|
## [3.0.1] - 2022-02-07
|
|
74
83
|
|
|
75
|
-
-
|
|
76
|
-
`@sitevision/api/common`
|
|
84
|
+
- Ignore `import/no-unresolved` for imports starting with `@sitevision/api/server`,
|
|
85
|
+
`@sitevision/api/common` and `@sitevision/api/client` as not all APIs are documented.
|
|
77
86
|
|
|
78
87
|
## [3.0.0] - 2022-02-07
|
|
79
88
|
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
89
|
+
- Only allow imports of Sitevision's APIs via `@sitevision/api`.
|
|
90
|
+
- Update paths in the global and webapp config to support the WebApps 2 structure.
|
|
91
|
+
- Update `peerDependencies` to the latest major versions.
|
|
83
92
|
|
|
84
93
|
## [2.4.5] - 2021-11-04
|
|
85
94
|
|
|
86
|
-
-
|
|
95
|
+
- Set `ecmaVersion` to 2021 in the client configuration if Vue is used.
|
|
87
96
|
|
|
88
97
|
## [2.4.4] - 2021-09-09
|
|
89
98
|
|
|
90
|
-
-
|
|
99
|
+
- Add `options` to `svelteSortOrder`.
|
|
91
100
|
|
|
92
101
|
## [2.4.3] - 2021-08-27
|
|
93
102
|
|
|
94
|
-
-
|
|
103
|
+
- Typo in the rule `no-return-assign` in Svelte files.
|
|
95
104
|
|
|
96
105
|
## [2.4.2] - 2021-08-17
|
|
97
106
|
|
|
98
|
-
-
|
|
107
|
+
- If Vue is used in the project, set `ecmaVersion` to 2021 instead as the plugin uses Espree which cannot handle the same version names as ESLint.
|
|
99
108
|
|
|
100
109
|
## [2.4.1] - 2021-08-17
|
|
101
110
|
|
|
102
|
-
-
|
|
111
|
+
- Set `ecmaVersion` to `latest` to avoid updating the version every year.
|
|
103
112
|
|
|
104
113
|
## [2.4.0] - 2021-03-24
|
|
105
114
|
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
115
|
+
- Deprecation notice for the configurations `@soleil/eslint-config/universal` and `@soleil/eslint-config/server`
|
|
116
|
+
- New configurations with clearer names: `@soleil/eslint-config/webapp` and `@soleil/eslint-config/server-legacy`
|
|
117
|
+
- Allow more properties per line in an object in `object-curly-newline`.
|
|
109
118
|
|
|
110
119
|
## [2.3.1] - 2021-02-24
|
|
111
120
|
|
|
112
|
-
-
|
|
121
|
+
- Revert `ecmaVersion` to 2020.
|
|
113
122
|
|
|
114
123
|
## [2.3.0] - 2021-02-24
|
|
115
124
|
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
125
|
+
- More rules overlap when writing universal code.
|
|
126
|
+
- Turned off `import/prefer-default-export`.
|
|
127
|
+
- Turned off `no-return-assign` in Svelte components.
|
|
128
|
+
- Removed linting of scripts in HTML for the server configuration for ES5 code.
|
|
120
129
|
|
|
121
130
|
## [2.2.1] - 2021-01-07
|
|
122
131
|
|
|
123
|
-
-
|
|
132
|
+
- Removed `babel-eslint` from dependencies.
|
|
124
133
|
|
|
125
134
|
## [2.2.0] - 2021-01-07
|
|
126
135
|
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
136
|
+
- Removed `babel-eslint` and use the standard parser with ES2020.
|
|
137
|
+
- Simplified `svelte.config.js`, usually the plugin for globbing is not needed.
|
|
138
|
+
- Added the package `cache` as an exception for SiteVision packages.
|
|
130
139
|
|
|
131
140
|
## [2.1.4] - 2020-10-26
|
|
132
141
|
|
|
133
|
-
-
|
|
142
|
+
- Removed incorrect configuration of `a11y-no-onchange`.
|
|
134
143
|
|
|
135
144
|
## [2.1.3] - 2020-10-21
|
|
136
145
|
|
|
137
|
-
-
|
|
146
|
+
- Added `app_src/views/**/*.js` in the server config.
|
|
138
147
|
|
|
139
148
|
## [2.1.2] - 2020-10-06
|
|
140
149
|
|
|
141
|
-
-
|
|
150
|
+
- Fixed incorrect `parserOptions` in the `server-es6` config.
|
|
142
151
|
|
|
143
152
|
## [2.1.1] - 2020-10-06
|
|
144
153
|
|
|
145
|
-
-
|
|
154
|
+
- Changed the order of the config so the settings Svelte needs for the server side are included.
|
|
146
155
|
|
|
147
156
|
## [2.1.0] - 2020-09-28
|
|
148
157
|
|
|
149
|
-
- Dependencies
|
|
150
|
-
- Dependencies
|
|
158
|
+
- Dependencies needed by default are listed as peerDependencies.
|
|
159
|
+
- Dependencies for framework-specific plugins need to be installed in addition to peerDependencies.
|
|
151
160
|
|
|
152
161
|
## [2.0.0] - 2020-09-28
|
|
153
162
|
|
|
154
|
-
-
|
|
155
|
-
-
|
|
156
|
-
-
|
|
157
|
-
-
|
|
163
|
+
- Support for Svelte.
|
|
164
|
+
- Updated structure.
|
|
165
|
+
- Update to ESLint 7.
|
|
166
|
+
- Removed the configuration for Vue, now in the client.
|
|
158
167
|
|
|
159
168
|
## [1.1.2] - 2020-02-05
|
|
160
169
|
|
|
161
|
-
-
|
|
170
|
+
- Changed the rule `import/extensions` to ignore json files.
|
|
162
171
|
|
|
163
172
|
## [1.1.1] - 2020-01-27
|
|
164
173
|
|
|
165
|
-
-
|
|
174
|
+
- Changed the rule `import/extensions` to ignore vue files.
|
|
166
175
|
|
|
167
176
|
## [1.1.0] - 2020-01-21
|
|
168
177
|
|
|
169
|
-
-
|
|
178
|
+
- Changed the rule `import/extensions` to ignore packages, solving issues with import via alias.
|
|
170
179
|
|
|
171
180
|
## [1.0.0] - 2020-01-13
|
|
172
181
|
|
|
173
|
-
-
|
|
182
|
+
- Updated to ESLint 6.
|
|
174
183
|
|
|
175
184
|
## [0.3.3] - 2019-12-06
|
|
176
185
|
|
|
177
|
-
-
|
|
186
|
+
- Now allows a maximum of 3 attributes per line in Vue (`vue/max-attributes-per-line`).
|
|
178
187
|
|
|
179
188
|
## [0.3.2] - 2019-06-03
|
|
180
189
|
|
|
181
|
-
-
|
|
190
|
+
- Added `server_src/api` in the server to the global config.
|
|
182
191
|
|
|
183
192
|
## [0.3.1] - 2019-05-20
|
|
184
193
|
|
|
185
|
-
-
|
|
194
|
+
- Turned off `global-require` to allow writing `require` inside IIFE in `src/index.js` in a WebApp.
|
|
186
195
|
|
|
187
196
|
## [0.3.0] - 2019-05-20
|
|
188
197
|
|
|
189
|
-
-
|
|
198
|
+
- Added a global config that can be used in the root of a project using the standard structure and `@soleil/sv-gulp-build@^3.0.0`.
|
package/README.md
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soleil-se/eslint-config",
|
|
3
|
-
"version": "6.0
|
|
4
|
-
"description": "ESLint
|
|
3
|
+
"version": "6.1.0",
|
|
4
|
+
"description": "ESLint configuration for Sitevision apps and projects.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"eslint",
|
|
7
|
+
"eslint-config",
|
|
8
|
+
"sitevision"
|
|
9
|
+
],
|
|
5
10
|
"author": "Soleil AB",
|
|
6
11
|
"license": "UNLICENSED",
|
|
7
12
|
"private": false,
|
|
@@ -11,8 +16,8 @@
|
|
|
11
16
|
"main": "./index.js",
|
|
12
17
|
"exports": {
|
|
13
18
|
".": "./index.js",
|
|
14
|
-
"./prettier": "./prettier
|
|
15
|
-
"./script-module": "./script-module
|
|
19
|
+
"./prettier": "./prettier.js",
|
|
20
|
+
"./script-module": "./script-module.js",
|
|
16
21
|
"./node": "./node-config.js",
|
|
17
22
|
"./rules":"./rules/**/*.js"
|
|
18
23
|
},
|
package/rules/js/style.js
CHANGED
|
@@ -372,7 +372,7 @@ export default {
|
|
|
372
372
|
// disallow dangling underscores in identifiers
|
|
373
373
|
// https://eslint.org/docs/rules/no-underscore-dangle
|
|
374
374
|
'no-underscore-dangle': ['error', {
|
|
375
|
-
allow: [],
|
|
375
|
+
allow: ['__rekai'],
|
|
376
376
|
allowAfterThis: false,
|
|
377
377
|
allowAfterSuper: false,
|
|
378
378
|
enforceInMethodNames: true,
|
|
@@ -5,11 +5,12 @@ import variables from './rules/js/variables.js';
|
|
|
5
5
|
|
|
6
6
|
export default [
|
|
7
7
|
{
|
|
8
|
-
name: 'soleil/
|
|
8
|
+
name: 'soleil/script-module',
|
|
9
9
|
languageOptions: {
|
|
10
10
|
ecmaVersion: 'latest',
|
|
11
|
-
sourceType: '
|
|
11
|
+
sourceType: 'script',
|
|
12
12
|
globals: {
|
|
13
|
+
require: 'readonly',
|
|
13
14
|
scriptVariables: 'readonly',
|
|
14
15
|
Packages: 'readonly',
|
|
15
16
|
request: 'readonly',
|
package/setup.js
CHANGED
|
@@ -97,12 +97,12 @@ function setupFiles() {
|
|
|
97
97
|
function setup() {
|
|
98
98
|
printStartup();
|
|
99
99
|
let packageFile = readJsonFileSync('./package.json');
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
100
|
+
packageFile = removeDependencies(packageFile);
|
|
101
|
+
|
|
103
102
|
if (packageFile.type !== 'module') {
|
|
104
103
|
packageFile.type = 'module';
|
|
105
104
|
}
|
|
105
|
+
|
|
106
106
|
writeJsonFileSync('./package.json', packageFile);
|
|
107
107
|
installDependencies();
|
|
108
108
|
setupFiles();
|
|
File without changes
|