@uva-glass/eslint-config 1.0.3 → 1.0.5

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/README.md CHANGED
@@ -9,11 +9,11 @@ The default configuration contains linting rules for [javascript][1], [imports][
9
9
  ### Install
10
10
 
11
11
  > **Note**
12
- >
12
+ >
13
13
  > Make sure Node >= 18 is installed
14
14
 
15
15
  ```
16
- npm i git@github.com:uva/GLASS-eslint.git --save-dev
16
+ npm i @uva-glass/eslint-config
17
17
  ```
18
18
 
19
19
  ### Using
@@ -24,7 +24,7 @@ Create an `.eslintrc.json` file in the root of your project and add the followin
24
24
 
25
25
  ```json
26
26
  {
27
- "extends": ["glass"]
27
+ "extends": ["@uva-glass/eslint-config"]
28
28
  }
29
29
  ```
30
30
 
@@ -34,7 +34,10 @@ This will apply Eslint rules from `@typescript-eslint/recommended`, `plugin:impo
34
34
 
35
35
  ```json
36
36
  {
37
- "extends": ["glass", "glass/testing-library-react"]
37
+ "extends": [
38
+ "@uva-glass/eslint-config",
39
+ "@uva-glass/eslint-config/testing-library-react"
40
+ ]
38
41
  }
39
42
  ```
40
43
 
@@ -46,10 +49,13 @@ Some rules might not be too specific or limiting for your code. In those cases,
46
49
 
47
50
  ```json
48
51
  {
49
- "extends": ["glass", "glass/testing-library-react"],
52
+ "extends": [
53
+ "@uva-glass/eslint-config",
54
+ "@uva-glass/eslint-config/testing-library-react"
55
+ ],
50
56
  "overrides": [
51
57
  {
52
- "extends": ["glass/node"],
58
+ "extends": ["@uva-glass/eslint-config/node"],
53
59
  "files": ["**/__mocks__/*.js"],
54
60
  "env": {
55
61
  "browser": false,
package/base.js CHANGED
@@ -7,7 +7,7 @@ module.exports = {
7
7
  "dot-location": ["warn", "property"],
8
8
  eqeqeq: ["warn", "smart"],
9
9
  "new-parens": "warn",
10
- "id-length": ["warn", { exceptions: ["t", "_"] }],
10
+ "id-length": ["warn", { exceptions: ["t", "_", "[x-z]"] }],
11
11
  "no-caller": "warn",
12
12
  "no-cond-assign": ["warn", "except-parens"],
13
13
  "no-const-assign": "warn",
package/index.js CHANGED
@@ -1,12 +1,3 @@
1
1
  module.exports = {
2
2
  extends: ["./base", "./import", "./react", "./typescript"],
3
- // configs: {
4
- // base: require("./base"),
5
- // import: require("./import"),
6
- // node: require("./node"),
7
- // react: require("./react"),
8
- // "testing-library-react": require("./testing-library-react"),
9
- // typescript: require("./typescript"),
10
- // },
11
- // rules: {},
12
3
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uva-glass/eslint-config",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "engines": {
5
5
  "node": ">=18"
6
6
  },
package/react.js CHANGED
@@ -62,7 +62,7 @@ module.exports = {
62
62
  "react/jsx-no-comment-textnodes": "error",
63
63
  "react/jsx-no-duplicate-props": "error",
64
64
  "react/jsx-no-undef": "error",
65
- "react/jsx-no-useless-fragment": "error",
65
+ "react/jsx-no-useless-fragment": ["error", { allowExpressions: true }],
66
66
  "react/jsx-pascal-case": ["error", { allowAllCaps: true, ignore: [] }],
67
67
  "react/jsx-tag-spacing": "error",
68
68
  "react/jsx-uses-react": "error",