@robinblomberg/eslint-config-robinblomberg 0.16.0 → 0.17.0-beta2

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 (2) hide show
  1. package/index.js +9 -11
  2. package/package.json +14 -11
package/index.js CHANGED
@@ -1,14 +1,17 @@
1
+ const { defineConfig } = require('eslint-define-config');
2
+
1
3
  const IS_DEVELOPMENT = !process.env.CI && process.env.NODE_ENV !== 'production';
2
4
  const error = 'error';
3
5
  const off = 'off';
4
6
  const warn = IS_DEVELOPMENT ? 'warn' : 'error';
5
7
 
6
- module.exports = {
8
+ module.exports = defineConfig({
7
9
  env: {
8
10
  browser: true,
9
- es6: true,
11
+ es2024: true,
10
12
  node: true,
11
13
  },
14
+ extends: ['plugin:sonarjs/recommended', 'plugin:unicorn/recommended'],
12
15
  globals: {
13
16
  globalThis: true,
14
17
  },
@@ -134,7 +137,6 @@ module.exports = {
134
137
  'private-instance-field',
135
138
  'protected-instance-field',
136
139
  'public-instance-field',
137
- 'private-abstract-field',
138
140
  'protected-abstract-field',
139
141
  'public-abstract-field',
140
142
  'static-field',
@@ -155,7 +157,6 @@ module.exports = {
155
157
  'private-instance-method',
156
158
  'protected-instance-method',
157
159
  'public-instance-method',
158
- 'private-abstract-method',
159
160
  'protected-abstract-method',
160
161
  'public-abstract-method',
161
162
  'static-method',
@@ -332,10 +333,7 @@ module.exports = {
332
333
  '@typescript-eslint/require-await': warn,
333
334
  '@typescript-eslint/restrict-plus-operands': [
334
335
  error,
335
- {
336
- allowAny: false,
337
- checkCompoundAssignments: true,
338
- },
336
+ { allowAny: false },
339
337
  ],
340
338
  // Disabled due to false positives:
341
339
  '@typescript-eslint/restrict-template-expressions': off,
@@ -728,11 +726,11 @@ module.exports = {
728
726
  ecmaFeatures: {
729
727
  jsx: true,
730
728
  },
731
- ecmaVersion: 2017,
729
+ ecmaVersion: 'latest',
732
730
  requireConfigFile: false,
733
731
  sourceType: 'module',
734
732
  },
735
- plugins: ['import', 'jsdoc', 'sort-keys'],
733
+ plugins: ['import', 'jsdoc', 'sort-keys', 'sonarjs', 'unicorn'],
736
734
  root: true,
737
735
  rules: {
738
736
  'accessor-pairs': warn,
@@ -1384,4 +1382,4 @@ module.exports = {
1384
1382
  version: 'detect',
1385
1383
  },
1386
1384
  },
1387
- };
1385
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinblomberg/eslint-config-robinblomberg",
3
- "version": "0.16.0",
3
+ "version": "0.17.0-beta2",
4
4
  "author": "Robin Blomberg",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -12,23 +12,26 @@
12
12
  },
13
13
  "homepage": "https://github.com/RobinBlomberg/eslint-config#readme",
14
14
  "dependencies": {
15
- "@babel/core": "^7.22.5",
16
- "@babel/eslint-parser": "^7.22.5",
17
- "@typescript-eslint/eslint-plugin": "^5.60.1",
18
- "@typescript-eslint/parser": "^5.60.1",
19
- "eslint-plugin-import": "^2.27.5",
20
- "eslint-plugin-jsdoc": "^46.3.0",
15
+ "@babel/core": "^7.22.9",
16
+ "@babel/eslint-parser": "^7.22.9",
17
+ "@typescript-eslint/eslint-plugin": "^6.2.1",
18
+ "@typescript-eslint/parser": "^6.2.1",
19
+ "eslint-define-config": "^1.22.0",
20
+ "eslint-plugin-import": "^2.28.0",
21
+ "eslint-plugin-jsdoc": "^46.4.5",
21
22
  "eslint-plugin-jsx-a11y": "^6.7.1",
22
- "eslint-plugin-react": "^7.32.2",
23
+ "eslint-plugin-react": "^7.33.1",
23
24
  "eslint-plugin-sort-keys": "^2.3.5"
24
25
  },
25
26
  "devDependencies": {
26
- "@robinblomberg/eslint-config-robinblomberg": "^0.15.3",
27
- "@types/node": "*"
27
+ "@robinblomberg/eslint-config-robinblomberg": "^0.16.0",
28
+ "@types/node": "*",
29
+ "eslint-plugin-sonarjs": "^0.19.0",
30
+ "eslint-plugin-unicorn": "^48.0.1"
28
31
  },
29
32
  "peerDependencies": {
30
33
  "eslint": "^8.43.0",
31
- "typescript": ">=3.3.1 <5.1.0"
34
+ "typescript": ">=4.2.0"
32
35
  },
33
36
  "scripts": {
34
37
  "lint": "eslint **/*.{js,ts}",