eslint-config-arklint 3.1.0 → 3.2.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/README.md CHANGED
@@ -14,27 +14,31 @@ yarn add eslint eslint-config-arklint -D
14
14
  > [!WARNING]
15
15
  > Only **flat config** is supported, either CJS or ESM.
16
16
 
17
- ### Default config
17
+ The default configuration includes standards and stylistic rules for JS. Optional extensions can be added to add rules for `import`, `react` and `jsdoc`:
18
18
 
19
- The default configuration includes standards and stylistic rules for JS.
19
+ **ESM**
20
20
 
21
21
  ```js
22
22
  import arklintConfig from "eslint-config-arklint";
23
+ import extensions from "eslint-config-arklint/extensions";
24
+
25
+ const { importConfig, reactConfig, jsdocConfig } = extensions;
23
26
 
24
27
  export default [
25
- ...arklintConfig
28
+ ...arklintConfig,
29
+ ...reactConfig,
30
+ ...importConfig,
31
+ ...jsdocConfig
26
32
  ];
27
33
  ```
28
34
 
29
- ### Extensions
30
-
31
- Optional extensions can be added to add rules for `import`, `react` and `jsdoc`:
35
+ **CJS**
32
36
 
33
37
  ```js
34
- import arklintConfig from "eslint-config-arklint";
35
- import { importConfig, reactConfig, jsdocConfig } from "eslint-config-arklint/extensions";
38
+ const arklintConfig = require("eslint-config-arklint");
39
+ const { importConfig, reactConfig, jsdocConfig } = require("eslint-config-arklint/extensions");
36
40
 
37
- export default [
41
+ module.exports = [
38
42
  ...arklintConfig,
39
43
  ...reactConfig,
40
44
  ...importConfig,
@@ -1,30 +1,26 @@
1
1
  var importPlugin = require("eslint-plugin-import");
2
- var sortImportsES6Autofix = require("eslint-plugin-sort-imports-es6-autofix");
2
+ var perfectionistPlugin = require("eslint-plugin-perfectionist");
3
3
  module.exports = [importPlugin.flatConfigs.recommended, {
4
4
  plugins: {
5
- "sort-imports-es6-autofix": sortImportsES6Autofix
5
+ perfectionist: perfectionistPlugin
6
6
  },
7
7
  rules: {
8
- "sort-imports-es6-autofix/sort-imports-es6": ["warn", {
9
- ignoreCase: true,
10
- memberSyntaxSortOrder: ["all", "multiple", "single", "none"]
11
- }],
12
8
  "import/no-named-as-default-member": "off",
13
9
  "import/no-anonymous-default-export": "off",
14
10
  "import/newline-after-import": ["warn", {
15
11
  count: 2,
16
12
  considerComments: true
17
13
  }],
18
- "import/order": ["warn", {
19
- "newlines-between": "always",
20
- "groups": [["type", "unknown", "builtin"], "external", ["internal", "parent", "index", "sibling"]],
21
- "warnOnUnassignedImports": true
22
- }],
23
14
  "import/first": "error",
24
15
  "import/no-amd": "error",
25
16
  "import/no-webpack-loader-syntax": "error",
26
17
  "import/no-unresolved": ["error", {
27
18
  commonjs: true
19
+ }],
20
+ "perfectionist/sort-exports": "warn",
21
+ "perfectionist/sort-named-imports": "warn",
22
+ "perfectionist/sort-imports": ["warn", {
23
+ groups: [["external", "builtin"], "internal", "parent", ["index", "sibling", "style"], "unknown"]
28
24
  }]
29
25
  }
30
26
  }];
@@ -1,6 +1,6 @@
1
1
  var jsxA11yPlugin = require("eslint-plugin-jsx-a11y");
2
- var reactHooksPlugin = require("eslint-plugin-react-hooks");
3
2
  var reactPlugin = require("eslint-plugin-react");
3
+ var reactHooksPlugin = require("eslint-plugin-react-hooks");
4
4
  module.exports = [reactPlugin.configs.flat.recommended, reactPlugin.configs.flat["jsx-runtime"], {
5
5
  plugins: {
6
6
  "react": reactPlugin,
package/cjs/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  var babelParser = require("@babel/eslint-parser");
2
- var globals = require("globals");
3
2
  var js = require("@eslint/js");
4
3
  var stylisticJsPlugin = require("@stylistic/eslint-plugin-js");
4
+ var globals = require("globals");
5
5
  module.exports = [{
6
6
  files: ["**/*.{js,mjs,cjs,jsx}"]
7
7
  }, {
@@ -1,30 +1,35 @@
1
1
  import importPlugin from "eslint-plugin-import";
2
- import sortImportsES6Autofix from "eslint-plugin-sort-imports-es6-autofix";
2
+ import perfectionistPlugin from "eslint-plugin-perfectionist";
3
3
 
4
4
 
5
5
  export default [
6
6
  importPlugin.flatConfigs.recommended,
7
7
  {
8
8
  plugins: {
9
- "sort-imports-es6-autofix": sortImportsES6Autofix
9
+ perfectionist: perfectionistPlugin
10
10
  },
11
11
  rules: {
12
- "sort-imports-es6-autofix/sort-imports-es6": ["warn", {
13
- ignoreCase: true,
14
- memberSyntaxSortOrder: ["all", "multiple", "single", "none"]
15
- }],
16
12
  "import/no-named-as-default-member": "off",
17
13
  "import/no-anonymous-default-export": "off",
18
- "import/newline-after-import": ["warn", { count: 2, considerComments: true }],
19
- "import/order": ["warn", {
20
- "newlines-between": "always",
21
- "groups": [["type", "unknown", "builtin"], "external", ["internal", "parent", "index", "sibling"]],
22
- "warnOnUnassignedImports": true
14
+ "import/newline-after-import": ["warn", {
15
+ count: 2,
16
+ considerComments: true
23
17
  }],
24
18
  "import/first": "error",
25
19
  "import/no-amd": "error",
26
20
  "import/no-webpack-loader-syntax": "error",
27
- "import/no-unresolved": ["error", { commonjs: true }]
21
+ "import/no-unresolved": ["error", { commonjs: true }],
22
+ "perfectionist/sort-exports": "warn",
23
+ "perfectionist/sort-named-imports": "warn",
24
+ "perfectionist/sort-imports": ["warn", {
25
+ groups: [
26
+ ["external", "builtin"],
27
+ "internal",
28
+ "parent",
29
+ ["index", "sibling", "style"],
30
+ "unknown"
31
+ ]
32
+ }]
28
33
  }
29
34
  }
30
35
  ];
@@ -1,6 +1,6 @@
1
1
  import jsxA11yPlugin from "eslint-plugin-jsx-a11y";
2
- import reactHooksPlugin from "eslint-plugin-react-hooks";
3
2
  import reactPlugin from "eslint-plugin-react";
3
+ import reactHooksPlugin from "eslint-plugin-react-hooks";
4
4
 
5
5
 
6
6
  export default [
package/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import babelParser from "@babel/eslint-parser";
2
- import globals from "globals";
3
2
  import js from "@eslint/js";
4
3
  import stylisticJsPlugin from "@stylistic/eslint-plugin-js";
4
+ import globals from "globals";
5
5
 
6
6
 
7
7
  export default [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-arklint",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "author": "Arkellys",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -32,25 +32,25 @@
32
32
  "prepare": "husky"
33
33
  },
34
34
  "dependencies": {
35
- "@babel/core": "^7.25.8",
36
- "@babel/eslint-parser": "^7.25.8",
37
- "@babel/preset-env": "^7.25.8",
38
- "@babel/preset-react": "^7.25.7",
39
- "@eslint/js": "^9.12.0",
35
+ "@babel/core": "^7.26.0",
36
+ "@babel/eslint-parser": "^7.25.9",
37
+ "@babel/preset-env": "^7.26.0",
38
+ "@babel/preset-react": "^7.25.9",
39
+ "@eslint/js": "^9.13.0",
40
40
  "@stylistic/eslint-plugin-js": "^2.9.0",
41
41
  "eslint-plugin-import": "^2.31.0",
42
- "eslint-plugin-jsdoc": "^50.3.2",
43
- "eslint-plugin-jsx-a11y": "^6.10.0",
44
- "eslint-plugin-react": "^7.37.1",
42
+ "eslint-plugin-jsdoc": "^50.4.3",
43
+ "eslint-plugin-jsx-a11y": "^6.10.2",
44
+ "eslint-plugin-perfectionist": "^3.9.1",
45
+ "eslint-plugin-react": "^7.37.2",
45
46
  "eslint-plugin-react-hooks": "^5.0.0",
46
- "eslint-plugin-sort-imports-es6-autofix": "^0.6.0",
47
47
  "globals": "^15.11.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@babel/cli": "^7.25.7",
50
+ "@babel/cli": "^7.25.9",
51
51
  "babel-plugin-transform-esm-to-cjs": "^0.0.0",
52
52
  "babel-plugin-transform-import-extension": "^1.0.3",
53
- "eslint": "^9.12.0",
53
+ "eslint": "^9.13.0",
54
54
  "husky": "^9.1.6"
55
55
  },
56
56
  "peerDependencies": {