@aiou/eslint-config 1.0.4 → 1.0.6

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.cjs CHANGED
@@ -111,7 +111,7 @@ const imports = () => {
111
111
  "import/no-unresolved": "off",
112
112
  "import/no-absolute-path": "off",
113
113
  // Not allowed import devDependencies
114
- "import/no-extraneous-dependencies": "error",
114
+ "import/no-extraneous-dependencies": ["error", { devDependencies: false }],
115
115
  // Not allow import { default as named }
116
116
  "import/no-named-default": "warn",
117
117
  "unused-imports/no-unused-imports": "error",
@@ -149,7 +149,9 @@ const imports = () => {
149
149
  {
150
150
  files: [
151
151
  `**/*config*.${GLOB_SCRIPT_EXT}`,
152
- `**/{pages,routes}/**/*.${GLOB_SCRIPT_EXT}`,
152
+ `**/{app,pages,routes}/**/*.${GLOB_SCRIPT_EXT}`,
153
+ `**/App*.${GLOB_SCRIPT_EXT}`,
154
+ `**/Document.${GLOB_SCRIPT_EXT}`,
153
155
  "**/{vite,esbuild,rollup,webpack,rspack}.ts",
154
156
  GLOB_DTS
155
157
  ],
@@ -4174,11 +4176,19 @@ const typescript = () => {
4174
4176
  * 1. https://ncjamieson.com/dont-export-const-enums/
4175
4177
  * 2. https://www.huy.rocks/everyday/02-24-2022-typescript-enums-at-runtime-and-tree-shaking
4176
4178
  */
4177
- "etc/no-const-enum": "error",
4178
- "etc/no-enum": "error",
4179
+ "no-restricted-syntax": [
4180
+ "error",
4181
+ {
4182
+ selector: "TSEnumDeclaration",
4183
+ message: "Don't declare enums"
4184
+ }
4185
+ ],
4179
4186
  // required tsconfig.json
4180
4187
  // 'etc/no-misused-generics': 'error',
4181
4188
  // Overrides JS
4189
+ // original no-undef not compatiable with typescript
4190
+ // refs: https://typescript-eslint.io/linting/troubleshooting/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
4191
+ "no-undef": "off",
4182
4192
  // no-spaced-func alert -- https://eslint.org/docs/latest/rules/no-spaced-func
4183
4193
  "func-call-spacing": "off",
4184
4194
  "@typescript-eslint/func-call-spacing": ["error", "never"],
package/dist/index.mjs CHANGED
@@ -109,7 +109,7 @@ const imports = () => {
109
109
  "import/no-unresolved": "off",
110
110
  "import/no-absolute-path": "off",
111
111
  // Not allowed import devDependencies
112
- "import/no-extraneous-dependencies": "error",
112
+ "import/no-extraneous-dependencies": ["error", { devDependencies: false }],
113
113
  // Not allow import { default as named }
114
114
  "import/no-named-default": "warn",
115
115
  "unused-imports/no-unused-imports": "error",
@@ -147,7 +147,9 @@ const imports = () => {
147
147
  {
148
148
  files: [
149
149
  `**/*config*.${GLOB_SCRIPT_EXT}`,
150
- `**/{pages,routes}/**/*.${GLOB_SCRIPT_EXT}`,
150
+ `**/{app,pages,routes}/**/*.${GLOB_SCRIPT_EXT}`,
151
+ `**/App*.${GLOB_SCRIPT_EXT}`,
152
+ `**/Document.${GLOB_SCRIPT_EXT}`,
151
153
  "**/{vite,esbuild,rollup,webpack,rspack}.ts",
152
154
  GLOB_DTS
153
155
  ],
@@ -4172,11 +4174,19 @@ const typescript = () => {
4172
4174
  * 1. https://ncjamieson.com/dont-export-const-enums/
4173
4175
  * 2. https://www.huy.rocks/everyday/02-24-2022-typescript-enums-at-runtime-and-tree-shaking
4174
4176
  */
4175
- "etc/no-const-enum": "error",
4176
- "etc/no-enum": "error",
4177
+ "no-restricted-syntax": [
4178
+ "error",
4179
+ {
4180
+ selector: "TSEnumDeclaration",
4181
+ message: "Don't declare enums"
4182
+ }
4183
+ ],
4177
4184
  // required tsconfig.json
4178
4185
  // 'etc/no-misused-generics': 'error',
4179
4186
  // Overrides JS
4187
+ // original no-undef not compatiable with typescript
4188
+ // refs: https://typescript-eslint.io/linting/troubleshooting/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
4189
+ "no-undef": "off",
4180
4190
  // no-spaced-func alert -- https://eslint.org/docs/latest/rules/no-spaced-func
4181
4191
  "func-call-spacing": "off",
4182
4192
  "@typescript-eslint/func-call-spacing": ["error", "never"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiou/eslint-config",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "eslint config for aiou template",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -55,7 +55,7 @@
55
55
  "jsonc-eslint-parser": "^2.4.0",
56
56
  "local-pkg": "^0.4.3",
57
57
  "yaml-eslint-parser": "^1.2.2",
58
- "@aiou/eslint-ignore": "0.5.0",
58
+ "@aiou/eslint-ignore": "0.5.1",
59
59
  "@aiou/eslint-plugin-progress": "0.3.1"
60
60
  },
61
61
  "devDependencies": {