@aiou/eslint-config 1.2.1 → 1.2.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.cjs CHANGED
@@ -56,6 +56,7 @@ const ignores = () => {
56
56
  const GLOB_SCRIPT_EXT = "?([cm])[jt]s?(x)";
57
57
  const GLOB_TEST_SCRIPT = "**/*.{spec,test}.?([cm])[jt]s?(x)";
58
58
  const GLOB_TEST_DIRS = "**/{test,tests,e2e,__test__,__tests__}/**";
59
+ const GLOB_PAGES_DIRS = "**/{pages,routes}/!(components)/**";
59
60
  const GLOB_DTS = "**/*.d.ts";
60
61
  const GLOB_TS = "**/*.?([cm])ts";
61
62
  const GLOB_TSX = "**/*.?([cm])tsx";
@@ -4010,7 +4011,11 @@ const react = () => {
4010
4011
  `**/*config*.${GLOB_SCRIPT_EXT}`,
4011
4012
  `**/*{-entry,entry.}*.${GLOB_SCRIPT_EXT}`,
4012
4013
  GLOB_TEST_SCRIPT,
4013
- GLOB_TEST_DIRS
4014
+ GLOB_TEST_DIRS,
4015
+ // With next.js pages will export getStaticProps funcs
4016
+ // There are some bad cases for not all files are route files
4017
+ // RECOMMEND: pages/routes should only contain page files
4018
+ GLOB_PAGES_DIRS
4014
4019
  ],
4015
4020
  rules: {
4016
4021
  "react-refresh/only-export-components": "off"
package/dist/index.mjs CHANGED
@@ -54,6 +54,7 @@ const ignores = () => {
54
54
  const GLOB_SCRIPT_EXT = "?([cm])[jt]s?(x)";
55
55
  const GLOB_TEST_SCRIPT = "**/*.{spec,test}.?([cm])[jt]s?(x)";
56
56
  const GLOB_TEST_DIRS = "**/{test,tests,e2e,__test__,__tests__}/**";
57
+ const GLOB_PAGES_DIRS = "**/{pages,routes}/!(components)/**";
57
58
  const GLOB_DTS = "**/*.d.ts";
58
59
  const GLOB_TS = "**/*.?([cm])ts";
59
60
  const GLOB_TSX = "**/*.?([cm])tsx";
@@ -4008,7 +4009,11 @@ const react = () => {
4008
4009
  `**/*config*.${GLOB_SCRIPT_EXT}`,
4009
4010
  `**/*{-entry,entry.}*.${GLOB_SCRIPT_EXT}`,
4010
4011
  GLOB_TEST_SCRIPT,
4011
- GLOB_TEST_DIRS
4012
+ GLOB_TEST_DIRS,
4013
+ // With next.js pages will export getStaticProps funcs
4014
+ // There are some bad cases for not all files are route files
4015
+ // RECOMMEND: pages/routes should only contain page files
4016
+ GLOB_PAGES_DIRS
4012
4017
  ],
4013
4018
  rules: {
4014
4019
  "react-refresh/only-export-components": "off"
package/dts/globs.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export declare const GLOB_SCRIPT_EXT = "?([cm])[jt]s?(x)";
2
2
  export declare const GLOB_TEST_SCRIPT = "**/*.{spec,test}.?([cm])[jt]s?(x)";
3
3
  export declare const GLOB_TEST_DIRS = "**/{test,tests,e2e,__test__,__tests__}/**";
4
+ export declare const GLOB_PAGES_DIRS = "**/{pages,routes}/!(components)/**";
4
5
  export declare const GLOB_DTS = "**/*.d.ts";
5
6
  export declare const GLOB_TS = "**/*.?([cm])ts";
6
7
  export declare const GLOB_TSX = "**/*.?([cm])tsx";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiou/eslint-config",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "eslint config for aiou template",
5
5
  "keywords": [],
6
6
  "license": "MIT",