@becklyn/eslint 1.0.2 → 1.0.4

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @becklyn/eslint@1.0.2 test
2
+ > @becklyn/eslint@1.0.4 test
3
3
  > echo "Error: no test specified" && exit 0
4
4
 
5
5
  Error: no test specified
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @becklyn/eslint
2
2
 
3
+ ## 1.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 380d95c: Fix turborepo integration
8
+ - 380d95c: Use react/jsx-curly-brace-presence
9
+
10
+ ## 1.0.3
11
+
12
+ ### Patch Changes
13
+
14
+ - 3091b3c: Fix import
15
+
3
16
  ## 1.0.2
4
17
 
5
18
  ### Patch Changes
package/README.md CHANGED
@@ -37,3 +37,25 @@ import { config } from "@becklyn/eslint/base";
37
37
  /** @type {import("eslint").Linter.Config} */
38
38
  export default config;
39
39
  ```
40
+
41
+
42
+ ## Turborepo
43
+
44
+ When using turborepo you might want to check for undeclared env variables.
45
+
46
+ Install `eslint-plugin-turbo`: `npm install -D eslint-plugin-turbo`
47
+
48
+ ```js
49
+ import { config } from "@becklyn/eslint/base";
50
+ import turboPlugin from "eslint-plugin-turbo";
51
+
52
+ /** @type {import("eslint").Linter.Config} */
53
+ export default [...nextJsConfig, {
54
+ plugins: {
55
+ turbo: turboPlugin,
56
+ },
57
+ rules: {
58
+ "turbo/no-undeclared-env-vars": "warn",
59
+ },
60
+ }];
61
+ ```
package/base.js CHANGED
@@ -1,8 +1,7 @@
1
1
  import js from "@eslint/js";
2
2
  import eslintConfigPrettier from "eslint-config-prettier";
3
- import turboPlugin from "eslint-plugin-turbo";
4
3
  import tseslint from "typescript-eslint";
5
- import importAlias from "@limegrass/import-alias";
4
+ import importAlias from "@limegrass/eslint-plugin-import-alias";
6
5
 
7
6
  /**
8
7
  * A shared ESLint configuration for the repository.
@@ -26,14 +25,6 @@ export const config = [
26
25
  ],
27
26
  },
28
27
  },
29
- {
30
- plugins: {
31
- turbo: turboPlugin,
32
- },
33
- rules: {
34
- "turbo/no-undeclared-env-vars": "warn",
35
- },
36
- },
37
28
  {
38
29
  ignores: ["dist/**"],
39
30
  },
package/next.js CHANGED
@@ -13,37 +13,41 @@ import { config as baseConfig } from "./base.js";
13
13
  * @type {import("eslint").Linter.Config}
14
14
  * */
15
15
  export const nextJsConfig = [
16
- ...baseConfig,
17
- js.configs.recommended,
18
- eslintConfigPrettier,
19
- ...tseslint.configs.recommended,
20
- {
21
- ...pluginReact.configs.flat.recommended,
22
- languageOptions: {
23
- ...pluginReact.configs.flat.recommended.languageOptions,
24
- globals: {
25
- ...globals.serviceworker,
26
- },
16
+ ...baseConfig,
17
+ js.configs.recommended,
18
+ eslintConfigPrettier,
19
+ ...tseslint.configs.recommended,
20
+ {
21
+ ...pluginReact.configs.flat.recommended,
22
+ languageOptions: {
23
+ ...pluginReact.configs.flat.recommended.languageOptions,
24
+ globals: {
25
+ ...globals.serviceworker,
26
+ },
27
+ },
27
28
  },
28
- },
29
- {
30
- plugins: {
31
- "@next/next": pluginNext,
29
+ {
30
+ plugins: {
31
+ "@next/next": pluginNext,
32
+ },
33
+ rules: {
34
+ ...pluginNext.configs.recommended.rules,
35
+ ...pluginNext.configs["core-web-vitals"].rules,
36
+ },
32
37
  },
33
- rules: {
34
- ...pluginNext.configs.recommended.rules,
35
- ...pluginNext.configs["core-web-vitals"].rules,
38
+ {
39
+ plugins: {
40
+ "react-hooks": pluginReactHooks,
41
+ },
42
+ settings: { react: { version: "detect" } },
43
+ rules: {
44
+ ...pluginReactHooks.configs.recommended.rules,
45
+ // React scope no longer necessary with new JSX transform.
46
+ "react/react-in-jsx-scope": "off",
47
+ "react/jsx-curly-brace-presence": [
48
+ "error",
49
+ { props: "never", children: "never", propElementValues: "ignore" },
50
+ ],
51
+ },
36
52
  },
37
- },
38
- {
39
- plugins: {
40
- "react-hooks": pluginReactHooks,
41
- },
42
- settings: { react: { version: "detect" } },
43
- rules: {
44
- ...pluginReactHooks.configs.recommended.rules,
45
- // React scope no longer necessary with new JSX transform.
46
- "react/react-in-jsx-scope": "off",
47
- },
48
- },
49
53
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@becklyn/eslint",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "license": "MIT",
5
5
  "description": "the eslint-config base we use for our TypeScript apps",
6
6
  "homepage": "https://github.com/Becklyn-Studios/ts-libs",
@@ -27,7 +27,6 @@
27
27
  "eslint-plugin-only-warn": "^1.1.0",
28
28
  "eslint-plugin-react": "^7.37.4",
29
29
  "eslint-plugin-react-hooks": "^5.1.0",
30
- "eslint-plugin-turbo": "^2.3.4",
31
30
  "globals": "^15.14.0",
32
31
  "typescript": "^5.7.3",
33
32
  "typescript-eslint": "^8.22.0"
package/react-internal.js CHANGED
@@ -11,29 +11,33 @@ import { config as baseConfig } from "./base.js";
11
11
  *
12
12
  * @type {import("eslint").Linter.Config} */
13
13
  export const config = [
14
- ...baseConfig,
15
- js.configs.recommended,
16
- eslintConfigPrettier,
17
- ...tseslint.configs.recommended,
18
- pluginReact.configs.flat.recommended,
19
- {
20
- languageOptions: {
21
- ...pluginReact.configs.flat.recommended.languageOptions,
22
- globals: {
23
- ...globals.serviceworker,
24
- ...globals.browser,
25
- },
14
+ ...baseConfig,
15
+ js.configs.recommended,
16
+ eslintConfigPrettier,
17
+ ...tseslint.configs.recommended,
18
+ pluginReact.configs.flat.recommended,
19
+ {
20
+ languageOptions: {
21
+ ...pluginReact.configs.flat.recommended.languageOptions,
22
+ globals: {
23
+ ...globals.serviceworker,
24
+ ...globals.browser,
25
+ },
26
+ },
26
27
  },
27
- },
28
- {
29
- plugins: {
30
- "react-hooks": pluginReactHooks,
28
+ {
29
+ plugins: {
30
+ "react-hooks": pluginReactHooks,
31
+ },
32
+ settings: { react: { version: "detect" } },
33
+ rules: {
34
+ ...pluginReactHooks.configs.recommended.rules,
35
+ // React scope no longer necessary with new JSX transform.
36
+ "react/react-in-jsx-scope": "off",
37
+ "react/jsx-curly-brace-presence": [
38
+ "error",
39
+ { props: "never", children: "never", propElementValues: "ignore" },
40
+ ],
41
+ },
31
42
  },
32
- settings: { react: { version: "detect" } },
33
- rules: {
34
- ...pluginReactHooks.configs.recommended.rules,
35
- // React scope no longer necessary with new JSX transform.
36
- "react/react-in-jsx-scope": "off",
37
- },
38
- },
39
43
  ];
package/eslint.js DELETED
@@ -1,12 +0,0 @@
1
- /** @type {import("eslint").Linter.Config} */
2
- module.exports = {
3
- plugins: ["react"],
4
- extends: ["next"],
5
- rules: {
6
- "react/jsx-curly-brace-presence": [
7
- 2,
8
- { props: "never", children: "never", propElementValues: "ignore" },
9
- ],
10
- },
11
- ignorePatterns: ["node_modules/", "dist/"],
12
- };