@robinblomberg/eslint-config-robinblomberg 0.20.0 → 0.22.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.
Files changed (3) hide show
  1. package/README.md +9 -9
  2. package/index.js +6 -6
  3. package/package.json +12 -12
package/README.md CHANGED
@@ -1,19 +1,19 @@
1
- # ESLint Config
1
+ # ESLint config
2
2
 
3
3
  ## Installation
4
4
 
5
- ```
6
- npm install --save-dev @robinblomberg/eslint-config-robinblomberg
5
+ ```sh
6
+ npm install -D @robinblomberg/eslint-config-robinblomberg
7
7
  ```
8
8
 
9
9
  ## Configuration
10
10
 
11
11
  Create a file called **.eslintrc.js** at the project root:
12
12
 
13
- ```javascript
13
+ ```js
14
14
  module.exports = {
15
- extends: '@robinblomberg/robinblomberg'
16
- }
15
+ extends: '@robinblomberg/robinblomberg',
16
+ };
17
17
  ```
18
18
 
19
19
  ## NPM scripts
@@ -24,7 +24,7 @@ Add the following scripts to your package.json:
24
24
  {
25
25
  "scripts": {
26
26
  "lint-scripts": "eslint \"**/*.{js,jsx,ts,tsx}\"",
27
- "lint-scripts-fix": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix",
27
+ "lint-scripts-fix": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix"
28
28
  }
29
29
  }
30
30
  ```
@@ -33,11 +33,11 @@ Adjust the paths according to your project/file structure as necessary (e.g. `"e
33
33
 
34
34
  To run a script, enter the following in your command line:
35
35
 
36
- ```
36
+ ```sh
37
37
  npm run lint-scripts
38
38
  ```
39
39
 
40
- ## Formatting on Save
40
+ ## Formatting on save
41
41
 
42
42
  With this knowledge of ESLint messages in mind, we can modify VS Code to tell ESLint to fix any issues (mainly formatting) every time we save. To open the settings menu, click on the gear icon in the lower left, and then choose **Settings**.
43
43
 
package/index.js CHANGED
@@ -649,7 +649,7 @@ module.exports = defineConfig({
649
649
  'react/no-direct-mutation-state': warn,
650
650
  'react/no-find-dom-node': warn,
651
651
  'react/no-is-mounted': warn,
652
- 'react/no-multi-comp': warn,
652
+ 'react/no-multi-comp': off,
653
653
  'react/no-redundant-should-component-update': warn,
654
654
  'react/no-render-return-value': warn,
655
655
  'react/no-set-state': off,
@@ -1369,8 +1369,8 @@ module.exports = defineConfig({
1369
1369
  'sonarjs/no-all-duplicated-branches': warn,
1370
1370
  'sonarjs/no-collapsible-if': warn,
1371
1371
  'sonarjs/no-collection-size-mischeck': warn,
1372
- 'sonarjs/no-duplicate-string': warn,
1373
- 'sonarjs/no-duplicated-branches': warn,
1372
+ 'sonarjs/no-duplicate-string': off,
1373
+ 'sonarjs/no-duplicated-branches': off,
1374
1374
  'sonarjs/no-element-overwrite': warn,
1375
1375
  'sonarjs/no-empty-collection': warn,
1376
1376
  'sonarjs/no-extra-arguments': warn,
@@ -1387,7 +1387,7 @@ module.exports = defineConfig({
1387
1387
  'sonarjs/no-redundant-boolean': warn,
1388
1388
  'sonarjs/no-redundant-jump': warn,
1389
1389
  'sonarjs/no-same-line-conditional': warn,
1390
- 'sonarjs/no-small-switch': warn,
1390
+ 'sonarjs/no-small-switch': off,
1391
1391
  'sonarjs/no-unused-collection': warn,
1392
1392
  'sonarjs/no-use-of-empty-return-value': warn,
1393
1393
  'sonarjs/no-useless-catch': warn,
@@ -1551,10 +1551,10 @@ module.exports = defineConfig({
1551
1551
  'unicorn/prefer-top-level-await': off,
1552
1552
  'unicorn/prefer-type-error': warn,
1553
1553
  'unicorn/prevent-abbreviations': off,
1554
- 'unicorn/relative-url-style': warn,
1554
+ 'unicorn/relative-url-style': off,
1555
1555
  'unicorn/require-array-join-separator': warn,
1556
1556
  'unicorn/require-number-to-fixed-digits-argument': warn,
1557
- 'unicorn/require-post-message-target-origin': off,
1557
+ 'unicorn/require-post-message-target-origin': warn,
1558
1558
  'unicorn/string-content': off,
1559
1559
  'unicorn/switch-case-braces': off,
1560
1560
  'unicorn/template-indent': warn,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinblomberg/eslint-config-robinblomberg",
3
- "version": "0.20.0",
3
+ "version": "0.22.0",
4
4
  "author": "Robin Blomberg",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -12,23 +12,23 @@
12
12
  },
13
13
  "homepage": "https://github.com/RobinBlomberg/eslint-config#readme",
14
14
  "dependencies": {
15
- "@babel/core": "^7.23.0",
16
- "@babel/eslint-parser": "^7.22.15",
17
- "@typescript-eslint/eslint-plugin": "^6.7.5",
18
- "@typescript-eslint/parser": "^6.7.5",
19
- "eslint-define-config": "^1.24.1",
20
- "eslint-plugin-import": "^2.28.1",
21
- "eslint-plugin-jsdoc": "^46.8.2",
22
- "eslint-plugin-jsx-a11y": "^6.7.1",
15
+ "@babel/core": "^7.23.6",
16
+ "@babel/eslint-parser": "^7.23.3",
17
+ "@typescript-eslint/eslint-plugin": "^6.14.0",
18
+ "@typescript-eslint/parser": "^6.14.0",
19
+ "eslint-define-config": "^2.0.0",
20
+ "eslint-plugin-import": "^2.29.0",
21
+ "eslint-plugin-jsdoc": "^46.9.1",
22
+ "eslint-plugin-jsx-a11y": "^6.8.0",
23
23
  "eslint-plugin-react": "^7.33.2",
24
- "eslint-plugin-sonarjs": "^0.21.0",
24
+ "eslint-plugin-sonarjs": "^0.23.0",
25
25
  "eslint-plugin-sort-exports": "^0.8.0",
26
26
  "eslint-plugin-sort-keys": "^2.3.5",
27
27
  "eslint-plugin-storybook": "^0.6.15",
28
- "eslint-plugin-unicorn": "^48.0.1"
28
+ "eslint-plugin-unicorn": "^49.0.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@robinblomberg/eslint-config-robinblomberg": "0.19.1",
31
+ "@robinblomberg/eslint-config-robinblomberg": "0.20.0",
32
32
  "@types/node": "*"
33
33
  },
34
34
  "peerDependencies": {