@fullstacksjs/eslint-config 8.3.0 → 8.4.0

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.
Files changed (3) hide show
  1. package/README.md +10 -0
  2. package/nextjs.js +25 -0
  3. package/package.json +6 -3
package/README.md CHANGED
@@ -58,6 +58,16 @@ Just extend from `@fullstacksjs`:
58
58
 
59
59
  It reads your root `package.json` dependencies and includes necessary rules.
60
60
 
61
+ ## NextJS
62
+
63
+ [NextJS](https://nextjs.org/) config is subset of base config which is compatible with builtin NextJS eslint config.
64
+
65
+ ```json
66
+ {
67
+ "extends": ["@fullstacksjs/eslint-config/nextjs"]
68
+ }
69
+ ```
70
+
61
71
  ## Advanced Usage
62
72
 
63
73
  ```jsonc
package/nextjs.js ADDED
@@ -0,0 +1,25 @@
1
+ /** @type { import('eslint').Linter.Config } */
2
+ module.exports = {
3
+ plugins: ['prettier', 'simple-import-sort', 'promise', 'node', 'fp'],
4
+ parserOptions: {
5
+ ecmaVersion: 2020,
6
+ sourceType: 'module',
7
+ requireConfigFile: false,
8
+ },
9
+ env: {
10
+ browser: true,
11
+ es6: true,
12
+ node: true,
13
+ },
14
+ extends: [
15
+ './rules/base',
16
+ './rules/es2015',
17
+ './rules/forbidden',
18
+ './rules/style',
19
+ './rules/variables',
20
+ './rules/fp',
21
+ './rules/promise',
22
+ './rules/node',
23
+ 'prettier',
24
+ ],
25
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstacksjs/eslint-config",
3
- "version": "8.3.0",
3
+ "version": "8.4.0",
4
4
  "license": "MIT",
5
5
  "author": "fullstacks <fullstacksjs@gmail.com>",
6
6
  "description": "fullstacks eslint config",
@@ -20,6 +20,7 @@
20
20
  "base.js",
21
21
  "index.js",
22
22
  "jest.js",
23
+ "nextjs.js",
23
24
  "cypress.js",
24
25
  "storybook.js",
25
26
  "graphql.js",
@@ -37,7 +38,8 @@
37
38
  "check-rules:cypress": "eslint-find-rules --no-core --unused ./tests/cypress.js",
38
39
  "check-rules:graphql": "eslint-find-rules --no-core --unused ./tests/graphql.js",
39
40
  "check-rules:storybook": "eslint-find-rules --no-core --unused ./tests/storybook.js",
40
- "test": "npm-run-all --parallel check-rules:*",
41
+ "spell": "cspell ./* --no-progress",
42
+ "test": "npm-run-all --parallel check-rules:* && npm run spell",
41
43
  "prepublishOnly": "pinst --disable",
42
44
  "postpublish": "pinst --enable",
43
45
  "pre-commit": "npm run test && lint-staged"
@@ -66,6 +68,7 @@
66
68
  "read-pkg-up": "7.0.1"
67
69
  },
68
70
  "devDependencies": {
71
+ "cspell": "5.19.7",
69
72
  "eslint": "8.12.0",
70
73
  "eslint-find-rules": "4.1.0",
71
74
  "husky": "7.0.4",
@@ -79,9 +82,9 @@
79
82
  "peerDependencies": {
80
83
  "cypress": ">=8",
81
84
  "eslint": ">=7",
85
+ "graphql": ">=15",
82
86
  "prettier": "2",
83
87
  "react": ">=16",
84
- "graphql": ">=15",
85
88
  "typescript": "4"
86
89
  },
87
90
  "peerDependenciesMeta": {