@richardscull/eslint-config 1.0.1 → 1.0.2

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/dist/index.d.ts CHANGED
@@ -1846,6 +1846,51 @@ interface RuleOptions {
1846
1846
  * @see https://eslint.org/docs/latest/rules/eqeqeq
1847
1847
  */
1848
1848
  'eqeqeq'?: Linter.RuleEntry<Eqeqeq>
1849
+ /**
1850
+ * require a `eslint-enable` comment for every `eslint-disable` comment
1851
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/disable-enable-pair.html
1852
+ */
1853
+ 'eslint-comments/disable-enable-pair'?: Linter.RuleEntry<EslintCommentsDisableEnablePair>
1854
+ /**
1855
+ * disallow a `eslint-enable` comment for multiple `eslint-disable` comments
1856
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-aggregating-enable.html
1857
+ */
1858
+ 'eslint-comments/no-aggregating-enable'?: Linter.RuleEntry<[]>
1859
+ /**
1860
+ * disallow duplicate `eslint-disable` comments
1861
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-duplicate-disable.html
1862
+ */
1863
+ 'eslint-comments/no-duplicate-disable'?: Linter.RuleEntry<[]>
1864
+ /**
1865
+ * disallow `eslint-disable` comments about specific rules
1866
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-restricted-disable.html
1867
+ */
1868
+ 'eslint-comments/no-restricted-disable'?: Linter.RuleEntry<EslintCommentsNoRestrictedDisable>
1869
+ /**
1870
+ * disallow `eslint-disable` comments without rule names
1871
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unlimited-disable.html
1872
+ */
1873
+ 'eslint-comments/no-unlimited-disable'?: Linter.RuleEntry<[]>
1874
+ /**
1875
+ * disallow unused `eslint-disable` comments
1876
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-disable.html
1877
+ */
1878
+ 'eslint-comments/no-unused-disable'?: Linter.RuleEntry<[]>
1879
+ /**
1880
+ * disallow unused `eslint-enable` comments
1881
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-enable.html
1882
+ */
1883
+ 'eslint-comments/no-unused-enable'?: Linter.RuleEntry<[]>
1884
+ /**
1885
+ * disallow ESLint directive-comments
1886
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-use.html
1887
+ */
1888
+ 'eslint-comments/no-use'?: Linter.RuleEntry<EslintCommentsNoUse>
1889
+ /**
1890
+ * require include descriptions in ESLint directive-comments
1891
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/require-description.html
1892
+ */
1893
+ 'eslint-comments/require-description'?: Linter.RuleEntry<EslintCommentsRequireDescription>
1849
1894
  /**
1850
1895
  * Enforce `for` loop update clause moving the counter in the right direction
1851
1896
  * @see https://eslint.org/docs/latest/rules/for-direction
@@ -8034,6 +8079,20 @@ type EolLast = []|[("always" | "never" | "unix" | "windows")]
8034
8079
  type Eqeqeq = ([]|["always"]|["always", {
8035
8080
  null?: ("always" | "never" | "ignore")
8036
8081
  }] | []|[("smart" | "allow-null")])
8082
+ // ----- eslint-comments/disable-enable-pair -----
8083
+ type EslintCommentsDisableEnablePair = []|[{
8084
+ allowWholeFile?: boolean
8085
+ }]
8086
+ // ----- eslint-comments/no-restricted-disable -----
8087
+ type EslintCommentsNoRestrictedDisable = string[]
8088
+ // ----- eslint-comments/no-use -----
8089
+ type EslintCommentsNoUse = []|[{
8090
+ allow?: ("eslint" | "eslint-disable" | "eslint-disable-line" | "eslint-disable-next-line" | "eslint-enable" | "eslint-env" | "exported" | "global" | "globals")[]
8091
+ }]
8092
+ // ----- eslint-comments/require-description -----
8093
+ type EslintCommentsRequireDescription = []|[{
8094
+ ignore?: ("eslint" | "eslint-disable" | "eslint-disable-line" | "eslint-disable-next-line" | "eslint-enable" | "eslint-env" | "exported" | "global" | "globals")[]
8095
+ }]
8037
8096
  // ----- func-call-spacing -----
8038
8097
  type FuncCallSpacing = ([]|["never"] | []|["always"]|["always", {
8039
8098
  allowNewlines?: boolean
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import commandConfig from 'eslint-plugin-command/config';
2
+ import eslintComments from '@eslint-community/eslint-plugin-eslint-comments';
2
3
  import pluginAntfu from 'eslint-plugin-antfu';
3
4
  import * as pluginImport from 'eslint-plugin-import-x';
4
5
  import simpleImportSort from 'eslint-plugin-simple-import-sort';
@@ -17,6 +18,23 @@ import pluginUnusedImports from 'eslint-plugin-unused-imports';
17
18
  import { isPackageExists, getPackageInfo, isPackageListed } from 'local-pkg';
18
19
  import { readPackageUp } from 'read-package-up';
19
20
 
21
+ function eslintCommentsConfig() {
22
+ return {
23
+ name: "extend/eslint-comments",
24
+ plugins: {
25
+ "eslint-comments": eslintComments
26
+ },
27
+ rules: {
28
+ "eslint-comments/require-description": [
29
+ "error",
30
+ {
31
+ ignore: []
32
+ }
33
+ ]
34
+ }
35
+ };
36
+ }
37
+
20
38
  function importConfig() {
21
39
  return {
22
40
  name: "extend/import",
@@ -1117,7 +1135,7 @@ async function mergeDefaultOptions(options) {
1117
1135
 
1118
1136
  async function defineConfig(options, ...args) {
1119
1137
  const finalOptions = await mergeDefaultOptions(options);
1120
- return config(finalOptions, ...javaScriptConfigs(finalOptions), ...unicornConfigs(finalOptions), ...typeScriptConfigs(finalOptions), importConfig(), unusedConfig(), regexConfig(), commandConfig(), ...stylisticConfigs(finalOptions), ...jsonConfigs(finalOptions), ...reactConfigs(finalOptions), tailwindCSSConfig(finalOptions), unocssConfig(finalOptions), ...args);
1138
+ return config(finalOptions, ...javaScriptConfigs(finalOptions), ...unicornConfigs(finalOptions), ...typeScriptConfigs(finalOptions), importConfig(), unusedConfig(), regexConfig(), commandConfig(), eslintCommentsConfig(), ...stylisticConfigs(finalOptions), ...jsonConfigs(finalOptions), ...reactConfigs(finalOptions), tailwindCSSConfig(finalOptions), unocssConfig(finalOptions), ...args);
1121
1139
  }
1122
1140
 
1123
1141
  export { DEFAULT_IGNORE_FILES, GLOB_EXCLUDE, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSON_SRC, GLOB_JSX_SRC, GLOB_JS_SRC, GLOB_SHOULD_BE_JSONC, GLOB_SRC, GLOB_TS_SRC, defineConfig };
package/package.json CHANGED
@@ -1,99 +1,100 @@
1
- {
2
- "name": "@richardscull/eslint-config",
3
- "type": "module",
4
- "version": "1.0.1",
5
- "packageManager": "pnpm@10.26.1",
6
- "description": "ESLint Config",
7
- "author": "richardscull, original by hyoban",
8
- "license": "MIT",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/richardscull/eslint-config.git"
12
- },
13
- "keywords": [
14
- "eslint-config"
15
- ],
16
- "sideEffects": false,
17
- "exports": {
18
- ".": "./dist/index.js"
19
- },
20
- "main": "./dist/index.js",
21
- "types": "./dist/index.d.ts",
22
- "files": [
23
- "dist"
24
- ],
25
- "engines": {
26
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
27
- },
28
- "scripts": {
29
- "build": "pnpm typegen && bunchee",
30
- "build:inspector": "npx @eslint/config-inspector build",
31
- "dev": "pnpm typegen && npx @eslint/config-inspector",
32
- "lint": "eslint",
33
- "lint:fix": "eslint --fix",
34
- "prepare": "simple-git-hooks && pnpm run build",
35
- "prepublishOnly": "pnpm run build",
36
- "test": "vitest",
37
- "typecheck": "tsc",
38
- "typegen": "tsx scripts/typegen.ts"
39
- },
40
- "peerDependencies": {
41
- "eslint": "^9.0.0",
42
- "typescript": ">=4.8.4"
43
- },
44
- "peerDependenciesMeta": {
45
- "typescript": {
46
- "optional": true
47
- }
48
- },
49
- "dependencies": {
50
- "@eslint-react/eslint-plugin": "^2.3.13",
51
- "@eslint/js": "^9.39.2",
52
- "@stylistic/eslint-plugin": "^5.6.1",
53
- "@typescript-eslint/types": "^8.50.0",
54
- "@unocss/eslint-config": "^66.5.10",
55
- "defu": "^6.1.4",
56
- "eslint-config-flat-gitignore": "^2.1.0",
57
- "eslint-plugin-antfu": "^3.1.1",
58
- "eslint-plugin-command": "^3.4.0",
59
- "eslint-plugin-hyoban": "^0.6.1",
60
- "eslint-plugin-import-x": "^4.16.1",
61
- "eslint-plugin-jsonc": "^2.21.0",
62
- "eslint-plugin-package-json": "^0.85.0",
63
- "eslint-plugin-react-google-translate": "^0.1.1",
64
- "eslint-plugin-react-hooks": "^7.0.1",
65
- "eslint-plugin-react-refresh": "^0.4.26",
66
- "eslint-plugin-regexp": "^2.10.0",
67
- "eslint-plugin-simple-import-sort": "^12.1.1",
68
- "eslint-plugin-tailwindcss": "4.0.0-beta.0",
69
- "eslint-plugin-unicorn": "^62.0.0",
70
- "eslint-plugin-unused-imports": "^4.3.0",
71
- "globals": "^16.5.0",
72
- "jsonc-eslint-parser": "^2.4.2",
73
- "local-pkg": "^1.1.2",
74
- "read-package-up": "^12.0.0",
75
- "typescript-eslint": "^8.50.0"
76
- },
77
- "devDependencies": {
78
- "@eslint/config-inspector": "1.4.2",
79
- "@types/node": "^22.19.3",
80
- "@types/react": "^19.2.7",
81
- "bunchee": "^6.6.2",
82
- "eslint": "^9.39.2",
83
- "eslint-typegen": "^2.3.0",
84
- "jiti": "^2.6.1",
85
- "lint-staged": "^16.2.7",
86
- "simple-git-hooks": "^2.13.1",
87
- "tailwindcss": "^4.1.18",
88
- "tsx": "^4.21.0",
89
- "typescript": "^5.9.3",
90
- "unocss": "^66.5.10",
91
- "vitest": "^4.0.16"
92
- },
93
- "simple-git-hooks": {
94
- "pre-commit": "pnpm lint-staged"
95
- },
96
- "lint-staged": {
97
- "*": "eslint --fix"
98
- }
99
- }
1
+ {
2
+ "name": "@richardscull/eslint-config",
3
+ "type": "module",
4
+ "version": "1.0.2",
5
+ "packageManager": "pnpm@10.26.1",
6
+ "description": "ESLint Config",
7
+ "author": "richardscull, original by hyoban",
8
+ "license": "MIT",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/richardscull/eslint-config.git"
12
+ },
13
+ "keywords": [
14
+ "eslint-config"
15
+ ],
16
+ "sideEffects": false,
17
+ "exports": {
18
+ ".": "./dist/index.js"
19
+ },
20
+ "main": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "engines": {
26
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
27
+ },
28
+ "scripts": {
29
+ "build": "pnpm typegen && bunchee",
30
+ "build:inspector": "npx @eslint/config-inspector build",
31
+ "dev": "pnpm typegen && npx @eslint/config-inspector",
32
+ "lint": "eslint",
33
+ "lint:fix": "eslint --fix",
34
+ "prepare": "simple-git-hooks && pnpm run build",
35
+ "prepublishOnly": "pnpm run build",
36
+ "test": "vitest",
37
+ "typecheck": "tsc",
38
+ "typegen": "tsx scripts/typegen.ts"
39
+ },
40
+ "peerDependencies": {
41
+ "eslint": "^9.0.0",
42
+ "typescript": ">=4.8.4"
43
+ },
44
+ "peerDependenciesMeta": {
45
+ "typescript": {
46
+ "optional": true
47
+ }
48
+ },
49
+ "dependencies": {
50
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
51
+ "@eslint-react/eslint-plugin": "^2.3.13",
52
+ "@eslint/js": "^9.39.2",
53
+ "@stylistic/eslint-plugin": "^5.6.1",
54
+ "@typescript-eslint/types": "^8.50.0",
55
+ "@unocss/eslint-config": "^66.5.10",
56
+ "defu": "^6.1.4",
57
+ "eslint-config-flat-gitignore": "^2.1.0",
58
+ "eslint-plugin-antfu": "^3.1.1",
59
+ "eslint-plugin-command": "^3.4.0",
60
+ "eslint-plugin-hyoban": "^0.6.1",
61
+ "eslint-plugin-import-x": "^4.16.1",
62
+ "eslint-plugin-jsonc": "^2.21.0",
63
+ "eslint-plugin-package-json": "^0.85.0",
64
+ "eslint-plugin-react-google-translate": "^0.1.1",
65
+ "eslint-plugin-react-hooks": "^7.0.1",
66
+ "eslint-plugin-react-refresh": "^0.4.26",
67
+ "eslint-plugin-regexp": "^2.10.0",
68
+ "eslint-plugin-simple-import-sort": "^12.1.1",
69
+ "eslint-plugin-tailwindcss": "4.0.0-beta.0",
70
+ "eslint-plugin-unicorn": "^62.0.0",
71
+ "eslint-plugin-unused-imports": "^4.3.0",
72
+ "globals": "^16.5.0",
73
+ "jsonc-eslint-parser": "^2.4.2",
74
+ "local-pkg": "^1.1.2",
75
+ "read-package-up": "^12.0.0",
76
+ "typescript-eslint": "^8.50.0"
77
+ },
78
+ "devDependencies": {
79
+ "@eslint/config-inspector": "1.4.2",
80
+ "@types/node": "^22.19.3",
81
+ "@types/react": "^19.2.7",
82
+ "bunchee": "^6.6.2",
83
+ "eslint": "^9.39.2",
84
+ "eslint-typegen": "^2.3.0",
85
+ "jiti": "^2.6.1",
86
+ "lint-staged": "^16.2.7",
87
+ "simple-git-hooks": "^2.13.1",
88
+ "tailwindcss": "^4.1.18",
89
+ "tsx": "^4.21.0",
90
+ "typescript": "^5.9.3",
91
+ "unocss": "^66.5.10",
92
+ "vitest": "^4.0.16"
93
+ },
94
+ "simple-git-hooks": {
95
+ "pre-commit": "pnpm lint-staged"
96
+ },
97
+ "lint-staged": {
98
+ "*": "eslint --fix"
99
+ }
100
+ }