@smartive/eslint-config 5.0.0-next.4 → 5.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/.eslintrc.react.js +8 -0
- package/CHANGELOG.md +3 -3
- package/README.md +6 -0
- package/package.json +1 -1
package/.eslintrc.react.js
CHANGED
|
@@ -5,6 +5,14 @@ module.exports = {
|
|
|
5
5
|
'react/prop-types': 'off',
|
|
6
6
|
'react/display-name': 'off',
|
|
7
7
|
'react/forbid-component-props': ['warn', { forbid: ['style', 'className'] }],
|
|
8
|
+
'@typescript-eslint/no-misused-promises': [
|
|
9
|
+
'error',
|
|
10
|
+
{
|
|
11
|
+
checksVoidReturn: {
|
|
12
|
+
attributes: false,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
],
|
|
8
16
|
},
|
|
9
17
|
parserOptions: {
|
|
10
18
|
ecmaFeatures: {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# [5.
|
|
1
|
+
# [5.1.0](https://github.com/smartive/eslint-config/compare/v5.0.0...v5.1.0) (2023-12-11)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Features
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* allow floating promises for JSX attributes ([#21](https://github.com/smartive/eslint-config/issues/21)) ([9d9f0f8](https://github.com/smartive/eslint-config/commit/9d9f0f85712cc3cb46aa6d774ba92d5bc1656c2e))
|
package/README.md
CHANGED
|
@@ -32,6 +32,8 @@ Create a `.eslintrc` file in the root of your project's directory (it should liv
|
|
|
32
32
|
}
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
+
### NPM scripts
|
|
36
|
+
|
|
35
37
|
To use eslint add the following to your package.json:
|
|
36
38
|
|
|
37
39
|
```json
|
|
@@ -40,3 +42,7 @@ To use eslint add the following to your package.json:
|
|
|
40
42
|
"lint:fix": "eslint . --fix"
|
|
41
43
|
}
|
|
42
44
|
```
|
|
45
|
+
|
|
46
|
+
### TypeScript configuration
|
|
47
|
+
|
|
48
|
+
Since there are some rules which require type information please make sure to set up a `tsconfig.json` configuration file in the root directory of your project. If your TypeScript configuration file is placed in another location you have to configure it using `parserOptions.project` in your ESLint configuration file. For more information have a look at the [typescript-eslint documentation](https://typescript-eslint.io/packages/parser/#project).
|