@viclafouch/eslint-config-viclafouch 3.9.3-beta.4 → 4.1.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.
package/README.md CHANGED
@@ -12,9 +12,10 @@ These are the ESLint and Prettier settings for a Next.js project ⚡️
12
12
  - [Scripts](#scripts)
13
13
  - [If you use TypeScript](#if-you-use-typescript)
14
14
  - [Extend your tsconfig](#extend-your-tsconfig)
15
+ - [Add the typescript eslint config](#add-the-typescript-eslint-config)
15
16
  - [Better typing](#better-typing)
16
17
  - [Scripts](#scripts-1)
17
- - [Better import sorting](#better-import-sorting)
18
+ - [Better import sorting](#better-import-sorting)
18
19
  - [If you use Next.js](#if-you-use-nextjs)
19
20
  - [If you use React.js](#if-you-use-reactjs)
20
21
  - [If you want to use Prettier](#if-you-want-to-use-prettier)
@@ -88,6 +89,8 @@ First, extend your current config file `tsconfig.json` with this following snipp
88
89
  }
89
90
  ```
90
91
 
92
+ ### Add the typescript eslint config
93
+
91
94
  Then, add the TypeScript Eslint rules to your `.eslintrc` file:
92
95
 
93
96
  ```js
@@ -149,14 +152,17 @@ You can add two scripts to your package.json to lint and/or fix your code:
149
152
  }
150
153
  ```
151
154
 
152
- ### Better import sorting
155
+ ## Better import sorting
153
156
 
154
157
  If you want to sort your imports using your alias at the same time from your `jsonfig.json` or `tsconfig.json` file.
155
158
 
156
159
  1. Import the `sortImports` function from the config in your `.eslintrc.js` file:
157
160
 
158
161
  ```js
159
- const { sortImports } = require('@viclafouch/eslint-config-viclafouch/rules/sort-imports')
162
+ const {
163
+ sortImports
164
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
165
+ } = require('@viclafouch/eslint-config-viclafouch/rules/sort-imports')
160
166
  ```
161
167
 
162
168
  2. Include the function in your `overrides` array like this:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viclafouch/eslint-config-viclafouch",
3
- "version": "3.9.3-beta.4",
3
+ "version": "4.1.0",
4
4
  "description": "ESLint and Prettier Config from Victor de la Fouchardiere",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -54,6 +54,8 @@
54
54
  "scripts": {
55
55
  "lint": "eslint .",
56
56
  "lint:fix": "eslint --fix",
57
+ "bump": "npm version minor",
58
+ "publish": "npm publish",
57
59
  "bump:beta": "npm version prerelease --preid beta",
58
60
  "publish:beta": "npm publish --tag beta"
59
61
  }
package/tsconfig.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "esModuleInterop": true,
12
12
  "module": "esnext",
13
13
  "noUncheckedIndexedAccess": true,
14
- "noPropertyAccessFromIndexSignature": true,
14
+ "noPropertyAccessFromIndexSignature": false,
15
15
  "moduleResolution": "node",
16
16
  "resolveJsonModule": true,
17
17
  "isolatedModules": true,