@soleil-se/eslint-config 6.0.2 → 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 CHANGED
@@ -2,192 +2,197 @@
2
2
  title: Changelog
3
3
  ---
4
4
 
5
- Alla förändringar i detta repository antecknas här.
5
+ All changes in this repository are noted here.
6
6
 
7
- Formatet baseras [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
8
- och projektet använder [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
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`.
9
14
 
10
15
  ## [6.0.2] - 2025-02-07
11
16
 
12
- * Uppdatera definitioner i package.json.
17
+ * Update definitions in package.json.
13
18
 
14
19
  ## [6.0.1] - 2025-02-05
15
20
 
16
- * Läs in Svelte konfiguration dynamiskt.
17
- * Uppdatera referenser för publicering npm.
21
+ * Load Svelte configuration dynamically.
22
+ * Update references for publishing on npm.
18
23
 
19
24
  ## [6.0.0] - 2025-02-04
20
25
 
21
- * Uppdatera till ESLint 9 och format konfigurationsfiler till flat config.
22
- * Ändra `trailingComma` till 'all' i Prettier-konfigurationen.
23
- * Lägg till global för `envision`.
24
- * Döpt om `legacy` till `script-module` det är det den används till.
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.
25
30
 
26
31
  ## [5.3.2] - 2024-12-13
27
32
 
28
- * Stäng av regeln `svelte/no-unused-svelte-ignore` den strular.
33
+ * Turn off the rule `svelte/no-unused-svelte-ignore` as it causes issues.
29
34
 
30
35
  ## [5.3.1] - 2024-11-15
31
36
 
32
- * Ta bort `svelte-preprocess` från dependencies det inte är relevant för eslint.
37
+ * Remove `svelte-preprocess` from the installation script as it is not relevant for eslint.
33
38
 
34
39
  ## [5.3.0] - 2024-10-21
35
40
 
36
- * Justerat regler för `prefer-const` och `max-len` för att fungera bättre med Svelte 5.
41
+ * Adjust rules for `prefer-const` and `max-len` to work better with Svelte 5.
37
42
 
38
43
  ## [5.2.0] - 2024-06-03
39
44
 
40
- * Nytt kommando för att installera dependencies och skapa konfigurationsfiler, `npx @soleil/eslint-config-sitevision --setup`.
45
+ * New command to install dependencies and create configuration files, `npx @soleil/eslint-config --setup`.
41
46
 
42
47
  ## [5.1.2] - 2023-10-26
43
48
 
44
- - Uppdatera inställningarna för `max-len` i Svelte-filer det bråkar med prettier.
49
+ - Update settings for `max-len` in Svelte files as it conflicts with prettier.
45
50
 
46
51
  ## [5.1.1] - 2023-08-22
47
52
 
48
- - Lägg till undantag för Sveltes submoduler import-pluginet inte kan resolva dessa trots att de finns tillgängliga.
53
+ - Add exceptions for Svelte's submodules as the import plugin cannot resolve these even though they are available.
49
54
 
50
55
  ## [5.1.0] - 2023-06-01
51
56
 
52
- - Lägg till varningar för API:er vars instanser inte borde importeras direkt utan skapas via andra API:er.
57
+ - Add warnings for APIs whose instances should not be imported directly but created via other APIs.
53
58
 
54
59
  ## [5.0.1] - 2023-05-31
55
60
 
56
- - Ignorera `max-len` för importer i style taggar i Svelte komponenter.
61
+ - Ignore `max-len` for imports in style tags in Svelte components.
57
62
 
58
63
  ## [5.0.0] - 2023-05-26
59
64
 
60
- - Nytt plugin för linting av Svelte.
65
+ - New plugin for linting Svelte.
61
66
 
62
67
  ## [4.0.1] - 2023-03-27
63
68
 
64
- - Läs bara in overrides för Svelte-filer när Svelte är installerat i projektet.
69
+ - Only load overrides for Svelte files when Svelte is installed in the project.
65
70
 
66
71
  ## [4.0.0] - 2022-06-22
67
72
 
68
- - Förenkla genom att ta bort de de olika konfigurationerna och använd en och samma config för allt utom legacy kod.
69
- - Modernisera legacy konfigurationen för att tillåta begränsad användning av ES2015+ som stöds av Rhino.
70
- - Använd `eslint-config-prettier` i Svelte komponenter för att undvika krockar med ESLint.
71
- - Ta bort stöd för Vue.
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.
72
77
 
73
78
  ## [3.1.0] - 2022-04-11
74
79
 
75
- - Tillåt användning av `console.error()` - för exempelvis try catch.
80
+ - Allow the use of `console.error()` - for example, in try catch.
76
81
 
77
82
  ## [3.0.1] - 2022-02-07
78
83
 
79
- - Ignorera `import/no-unresolved` för importer som börjar med `@sitevision/api/server`,
80
- `@sitevision/api/common` och `@sitevision/api/client` alla API:er inte finns dokumenterade.
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.
81
86
 
82
87
  ## [3.0.0] - 2022-02-07
83
88
 
84
- - Tillåt enbart importer av Sitevisions API:er via `@sitevision/api`.
85
- - Uppdaterat sökvägarna i den globala och webapp configen för att stödja WebApps 2 strukturen.
86
- - Uppdaterat `peerDependencies` till senaste major versionerna.
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.
87
92
 
88
93
  ## [2.4.5] - 2021-11-04
89
94
 
90
- - Sätt `ecmaVersion` till 2021 i client kontfigurationen om Vue används.
95
+ - Set `ecmaVersion` to 2021 in the client configuration if Vue is used.
91
96
 
92
97
  ## [2.4.4] - 2021-09-09
93
98
 
94
- - Lägg till `options` i `svelteSortOrder`.
99
+ - Add `options` to `svelteSortOrder`.
95
100
 
96
101
  ## [2.4.3] - 2021-08-27
97
102
 
98
- - Felstavning i regeln `no-return-assign` i Svelte-filer.
103
+ - Typo in the rule `no-return-assign` in Svelte files.
99
104
 
100
105
  ## [2.4.2] - 2021-08-17
101
106
 
102
- - Om Vue används i projektet sätt `ecmaVersion` till 2021 istället pluginet använder Espree vilket inte klarar av samma versionsnamn som ESLint.
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.
103
108
 
104
109
  ## [2.4.1] - 2021-08-17
105
110
 
106
- - Sätt `ecmaVersion` till `latest` för att slippa uppdatera version varje år.
111
+ - Set `ecmaVersion` to `latest` to avoid updating the version every year.
107
112
 
108
113
  ## [2.4.0] - 2021-03-24
109
114
 
110
- - Meddelande av deprekering för konfigurationerna `@soleil/eslint-config-sitevision/universal` och `@soleil/eslint-config-sitevision/server`
111
- - Nya konfigurationer med tydligare namn: `@soleil/eslint-config-sitevision/webapp` och `@soleil/eslint-config-sitevision/server-legacy`
112
- - Tillåt fler properties per rad i ett objekt i `object-curly-newline`.
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`.
113
118
 
114
119
  ## [2.3.1] - 2021-02-24
115
120
 
116
- - Dra tillbaka till `ecmaVersion` till 2020.
121
+ - Revert `ecmaVersion` to 2020.
117
122
 
118
123
  ## [2.3.0] - 2021-02-24
119
124
 
120
- - Fler regler överlappar när man skriver universell kod.
121
- - Slagit av `import/prefer-default-export`.
122
- - Slagit av `no-return-assig` i Svelte komponenter.
123
- - Tagit bort linting av skript i HTML för server konfigurationen för ES5-kod.
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.
124
129
 
125
130
  ## [2.2.1] - 2021-01-07
126
131
 
127
- - Tagit bort `babel-eslint` från dependencies.
132
+ - Removed `babel-eslint` from dependencies.
128
133
 
129
134
  ## [2.2.0] - 2021-01-07
130
135
 
131
- - Tagit bort `babel-eslint` och använder standardparsern med ES2020.
132
- - Förenklat `svelte.config.js`, oftast behövs inte plugin för globbing.
133
- - Lagt till paketet `cache` som undantag för SiteVision paket.
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.
134
139
 
135
140
  ## [2.1.4] - 2020-10-26
136
141
 
137
- - Tagit bort felaktig konfiguration av `a11y-no-onchange`.
142
+ - Removed incorrect configuration of `a11y-no-onchange`.
138
143
 
139
144
  ## [2.1.3] - 2020-10-21
140
145
 
141
- - Lagt till `app_src/views/**/*.js` i server configen.
146
+ - Added `app_src/views/**/*.js` in the server config.
142
147
 
143
148
  ## [2.1.2] - 2020-10-06
144
149
 
145
- - Åträgrdat felaktiga `parserOptions` i `server-es6` configen.
150
+ - Fixed incorrect `parserOptions` in the `server-es6` config.
146
151
 
147
152
  ## [2.1.1] - 2020-10-06
148
153
 
149
- - Ändrat ordning config de inställningar Svelte behöver för serversidan kommer med.
154
+ - Changed the order of the config so the settings Svelte needs for the server side are included.
150
155
 
151
156
  ## [2.1.0] - 2020-09-28
152
157
 
153
- - Dependencies som behövs som standard ligger som peerDependencies
154
- - Dependencies för ramverksspecifika plugins behöver installeras utöver peerDependencies.
158
+ - Dependencies needed by default are listed as peerDependencies.
159
+ - Dependencies for framework-specific plugins need to be installed in addition to peerDependencies.
155
160
 
156
161
  ## [2.0.0] - 2020-09-28
157
162
 
158
- - Stöd för Svelte.
159
- - Uppdaterad struktur.
160
- - Uppdatering till ESLint 7.
161
- - Tagit bort konfigurationen för Vue, ligger nu i client.
163
+ - Support for Svelte.
164
+ - Updated structure.
165
+ - Update to ESLint 7.
166
+ - Removed the configuration for Vue, now in the client.
162
167
 
163
168
  ## [1.1.2] - 2020-02-05
164
169
 
165
- - Ändrat regeln `import/extensions` den ignorerar json-filer.
170
+ - Changed the rule `import/extensions` to ignore json files.
166
171
 
167
172
  ## [1.1.1] - 2020-01-27
168
173
 
169
- - Ändrat regeln `import/extensions` den ignorerar vue-filer.
174
+ - Changed the rule `import/extensions` to ignore vue files.
170
175
 
171
176
  ## [1.1.0] - 2020-01-21
172
177
 
173
- - Ändrat regeln `import/extensions` den ignorerar paket, löser problem med import via alias.
178
+ - Changed the rule `import/extensions` to ignore packages, solving issues with import via alias.
174
179
 
175
180
  ## [1.0.0] - 2020-01-13
176
181
 
177
- - Uppdaterat till ESLint 6.
182
+ - Updated to ESLint 6.
178
183
 
179
184
  ## [0.3.3] - 2019-12-06
180
185
 
181
- - Det får nu vara max 3 attribut per rad i Vue (`vue/max-attributes-per-line`).
186
+ - Now allows a maximum of 3 attributes per line in Vue (`vue/max-attributes-per-line`).
182
187
 
183
188
  ## [0.3.2] - 2019-06-03
184
189
 
185
- - Lagt till `server_src/api` i server den globala configen.
190
+ - Added `server_src/api` in the server to the global config.
186
191
 
187
192
  ## [0.3.1] - 2019-05-20
188
193
 
189
- - Slagit av `global-require` för att kunna skriva `require` innanför IIFE i `src/index.js` i en WebApp.
194
+ - Turned off `global-require` to allow writing `require` inside IIFE in `src/index.js` in a WebApp.
190
195
 
191
196
  ## [0.3.0] - 2019-05-20
192
197
 
193
- - Lagt till en global config som kan användas i roten av ett projekt som använder standardstrukturen och `@soleil/sv-gulp-build@^3.0.0`.
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
@@ -2,4 +2,4 @@
2
2
 
3
3
  ESLint configuration for Sitevision apps and projects.
4
4
 
5
- [Documentation](https://docs.soleil.se/packages/eslint-config)
5
+ [Documentation](https://docs.soleil.se/packages/eslint-config) | [Changelog](https://docs.soleil.se/packages/eslint-config/changelog)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soleil-se/eslint-config",
3
- "version": "6.0.2",
3
+ "version": "6.1.0",
4
4
  "description": "ESLint configuration for Sitevision apps and projects.",
5
5
  "keywords": [
6
6
  "eslint",
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,
package/script-module.js CHANGED
@@ -5,11 +5,12 @@ import variables from './rules/js/variables.js';
5
5
 
6
6
  export default [
7
7
  {
8
- name: 'soleil/base',
8
+ name: 'soleil/script-module',
9
9
  languageOptions: {
10
10
  ecmaVersion: 'latest',
11
- sourceType: 'commonjs',
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
- if (packageFile?.devDependencies?.eslint) {
101
- packageFile = removeDependencies(packageFile);
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();