@ornikar/eslint-config-babel 22.7.3 → 22.7.4
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 +8 -0
- package/README.md +7 -1
- package/_shared.js +2 -21
- package/index.js +26 -3
- package/package.json +3 -3
- package/rules/prefer-class-properties.js +9 -6
- package/.eslintrc.json +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## <small>22.7.4 (2026-05-28)</small>
|
|
7
|
+
|
|
8
|
+
* feat!: ESLint flat-config migration [OSE-20589] (#820) ([6c7897b](https://github.com/ornikar/eslint-configs/commit/6c7897b)), closes [#820](https://github.com/ornikar/eslint-configs/issues/820)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## <small>22.7.3 (2026-05-26)</small>
|
|
7
15
|
|
|
8
16
|
* feat!: ESLint v9 engine bump (legacy .eslintrc preserved) [OSE-20589] (#818) ([9683864](https://github.com/ornikar/eslint-configs/commit/9683864)), closes [#818](https://github.com/ornikar/eslint-configs/issues/818)
|
package/README.md
CHANGED
|
@@ -14,4 +14,10 @@ Also see:
|
|
|
14
14
|
- [@ornikar/eslint-config-typescript-react](https://github.com/ornikar/eslint-configs/tree/master/%40ornikar/eslint-config-typescript-react)
|
|
15
15
|
|
|
16
16
|
1. `npm install --save-dev eslint @ornikar/eslint-config-babel`
|
|
17
|
-
2.
|
|
17
|
+
2. In your `eslint.config.js`:
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
const babelConfig = require('@ornikar/eslint-config-babel');
|
|
21
|
+
|
|
22
|
+
module.exports = [...babelConfig];
|
|
23
|
+
```
|
package/_shared.js
CHANGED
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
extends: ['./rules/prefer-class-properties'].map(require.resolve),
|
|
3
|
+
const preferClassProperties = require('./rules/prefer-class-properties');
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
sourceType: 'module',
|
|
8
|
-
// as we use babel, we can use latest ecma features
|
|
9
|
-
ecmaVersion: 2022,
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
rules: {
|
|
13
|
-
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md
|
|
14
|
-
// disallow require when using babel
|
|
15
|
-
'import/no-commonjs': 'error',
|
|
16
|
-
|
|
17
|
-
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/import/no-extraneous-dependencies.md
|
|
18
|
-
// override default airbnb exceptions
|
|
19
|
-
'import/no-extraneous-dependencies': ['error', { devDependencies: false }],
|
|
20
|
-
|
|
21
|
-
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md
|
|
22
|
-
'import/prefer-default-export': 'off',
|
|
23
|
-
},
|
|
24
|
-
};
|
|
5
|
+
module.exports = [...preferClassProperties];
|
package/index.js
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
const ornikarConfig = require('@ornikar/eslint-config');
|
|
4
|
+
const sharedConfig = require('./_shared');
|
|
5
|
+
|
|
6
|
+
module.exports = [
|
|
7
|
+
...ornikarConfig,
|
|
8
|
+
...sharedConfig,
|
|
9
|
+
{
|
|
10
|
+
languageOptions: {
|
|
11
|
+
sourceType: 'module',
|
|
12
|
+
// as we use babel, we can use latest ecma features
|
|
13
|
+
ecmaVersion: 2022,
|
|
14
|
+
},
|
|
15
|
+
rules: {
|
|
16
|
+
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md
|
|
17
|
+
// disallow require when using babel
|
|
18
|
+
'import/no-commonjs': 'error',
|
|
19
|
+
|
|
20
|
+
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/import/no-extraneous-dependencies.md
|
|
21
|
+
// override default airbnb exceptions
|
|
22
|
+
'import/no-extraneous-dependencies': ['error', { devDependencies: false }],
|
|
23
|
+
|
|
24
|
+
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md
|
|
25
|
+
'import/prefer-default-export': 'off',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ornikar/eslint-config-babel",
|
|
3
|
-
"version": "22.7.
|
|
3
|
+
"version": "22.7.4",
|
|
4
4
|
"description": "eslint babel config files",
|
|
5
5
|
"repository": {
|
|
6
6
|
"directory": "@ornikar/eslint-config-babel",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@ornikar/eslint-config": "22.7.
|
|
19
|
+
"@ornikar/eslint-config": "22.7.4",
|
|
20
20
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
21
21
|
"eslint-plugin-babel": "^5.3.0",
|
|
22
22
|
"eslint-plugin-import": "^2.25.4",
|
|
@@ -30,6 +30,6 @@
|
|
|
30
30
|
"eslint": "9.39.4"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
|
-
"lint:eslint": "
|
|
33
|
+
"lint:eslint": "yarn ../.. eslint --report-unused-disable-directives --quiet @ornikar/eslint-config-babel"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
plugins: ['prefer-class-properties'],
|
|
3
|
+
const preferClassPropertiesPlugin = require('eslint-plugin-prefer-class-properties');
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
'prefer-class-properties
|
|
5
|
+
module.exports = [
|
|
6
|
+
{
|
|
7
|
+
plugins: { 'prefer-class-properties': preferClassPropertiesPlugin },
|
|
8
|
+
rules: {
|
|
9
|
+
// https://www.npmjs.com/package/eslint-plugin-prefer-class-properties
|
|
10
|
+
'prefer-class-properties/prefer-class-properties': 'error',
|
|
11
|
+
},
|
|
9
12
|
},
|
|
10
|
-
|
|
13
|
+
];
|
package/.eslintrc.json
DELETED