-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v2.0.0 - Split JS and JSX Rules (#7)
* js, react config export * try running llocally * update docs * upgrade pkgs * update readme * minor change --------- Co-authored-by: nishant.kohli <[email protected]>
- Loading branch information
1 parent
185e805
commit c3d6037
Showing
9 changed files
with
860 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
const eslintConfig = require('./lib'); | ||
var jsEslintConfig = require('./lib/js'); | ||
var reactEslintConfig = require( './lib/react'); | ||
|
||
module.exports = { | ||
...eslintConfig, | ||
plugins: [ | ||
'@stylistic/eslint-plugin' | ||
], | ||
...reactEslintConfig, | ||
rules: { | ||
...jsEslintConfig.rules, | ||
...reactEslintConfig.rules | ||
}, | ||
plugins: ['@stylistic/eslint-plugin'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Migration Guide | ||
|
||
**Starting v2 onwards, the linting rules for javascript and react have been split to purge out any unnecessary rules when using this config in a standalone nodejs application.** | ||
|
||
For usage in a nodejs application, use only the `js` eslint configuration of this package. | ||
|
||
```diff | ||
module.exports = { | ||
- extends: ['@nish1896'] | ||
+ extends: ['@nish1896/eslint-config/js'] | ||
} | ||
``` | ||
|
||
React applications would need both the `js` and `react` config import of this package. | ||
```diff | ||
module.exports = { | ||
- extends: ['@nish1896'] | ||
+ extends: ['@nish1896/eslint-config/js', '@nish1896/eslint-config/react'] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
var st = '122' | ||
var st = "122" | ||
|
||
const func = (e) => console.log('some function'); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.