-
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
recommended.js is a flat config version of the recommended config. This diverges from the legacy config version of the recommended config as it does not automatically configure eslint-config-prettier. Configs extending other configs is complicated and not transparent. We should trust the user to configure their configs directly. In a future major change we should remove eslint-config-prettier from the legacy config too.
- Loading branch information
Showing
4 changed files
with
24 additions
and
6 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
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,5 @@ | ||
import { Linter } from 'eslint'; | ||
|
||
declare const recommendedConfig: Linter.FlatConfig; | ||
|
||
export = recommendedConfig; |
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,15 @@ | ||
const eslintPluginPrettier = require('./eslint-plugin-prettier'); | ||
|
||
// This diverges from the legacy format recommended config, as it does not | ||
// extend from the `eslint-config-prettier` ruleset. When using the flat config | ||
// the consumer should add eslint-config-prettier to their own root config. | ||
module.exports = { | ||
plugins: { | ||
prettier: eslintPluginPrettier, | ||
}, | ||
rules: { | ||
'prettier/prettier': 'error', | ||
'arrow-body-style': 'off', | ||
'prefer-arrow-callback': 'off', | ||
}, | ||
}; |