@aiou/eslint-config 1.2.1 → 1.2.3

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,8 @@ 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}/**";
60
+ const GLOB_PAGES_COMPONENTS_DIRS = "**/{pages,routes}/components/**";
59
61
  const GLOB_DTS = "**/*.d.ts";
60
62
  const GLOB_TS = "**/*.?([cm])ts";
61
63
  const GLOB_TSX = "**/*.?([cm])tsx";
@@ -4010,7 +4012,14 @@ const react = () => {
4010
4012
  `**/*config*.${GLOB_SCRIPT_EXT}`,
4011
4013
  `**/*{-entry,entry.}*.${GLOB_SCRIPT_EXT}`,
4012
4014
  GLOB_TEST_SCRIPT,
4013
- GLOB_TEST_DIRS
4015
+ GLOB_TEST_DIRS,
4016
+ // With next.js pages will export getStaticProps funcs
4017
+ // There are some bad cases for not all files are route files
4018
+ // RECOMMEND: pages/routes should only contain page files
4019
+ GLOB_PAGES_DIRS
4020
+ ],
4021
+ ignores: [
4022
+ GLOB_PAGES_COMPONENTS_DIRS
4014
4023
  ],
4015
4024
  rules: {
4016
4025
  "react-refresh/only-export-components": "off"
package/dist/index.mjs CHANGED
@@ -54,6 +54,8 @@ 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}/**";
58
+ const GLOB_PAGES_COMPONENTS_DIRS = "**/{pages,routes}/components/**";
57
59
  const GLOB_DTS = "**/*.d.ts";
58
60
  const GLOB_TS = "**/*.?([cm])ts";
59
61
  const GLOB_TSX = "**/*.?([cm])tsx";
@@ -4008,7 +4010,14 @@ const react = () => {
4008
4010
  `**/*config*.${GLOB_SCRIPT_EXT}`,
4009
4011
  `**/*{-entry,entry.}*.${GLOB_SCRIPT_EXT}`,
4010
4012
  GLOB_TEST_SCRIPT,
4011
- GLOB_TEST_DIRS
4013
+ GLOB_TEST_DIRS,
4014
+ // With next.js pages will export getStaticProps funcs
4015
+ // There are some bad cases for not all files are route files
4016
+ // RECOMMEND: pages/routes should only contain page files
4017
+ GLOB_PAGES_DIRS
4018
+ ],
4019
+ ignores: [
4020
+ GLOB_PAGES_COMPONENTS_DIRS
4012
4021
  ],
4013
4022
  rules: {
4014
4023
  "react-refresh/only-export-components": "off"
package/dts/globs.d.ts CHANGED
@@ -1,6 +1,8 @@
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}/**";
5
+ export declare const GLOB_PAGES_COMPONENTS_DIRS = "**/{pages,routes}/components/**";
4
6
  export declare const GLOB_DTS = "**/*.d.ts";
5
7
  export declare const GLOB_TS = "**/*.?([cm])ts";
6
8
  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.3",
4
4
  "description": "eslint config for aiou template",
5
5
  "keywords": [],
6
6
  "license": "MIT",