-
Notifications
You must be signed in to change notification settings - Fork 25.2k
fix(eslint-config): Clashes with prettier #26847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,7 +112,7 @@ module.exports = { | |
|
|
||
| rules: { | ||
| // General | ||
| 'comma-dangle': [1, 'always-multiline'], // allow or disallow trailing commas | ||
| 'comma-dangle': 0, // allow or disallow trailing commas (off by default) | ||
| 'no-cond-assign': 1, // disallow assignment in conditional expressions | ||
| 'no-console': 0, // disallow use of console (off by default in the node environment) | ||
| 'no-const-assign': 2, // disallow assignment to const-declared variables | ||
|
|
@@ -250,9 +250,9 @@ module.exports = { | |
| 'no-trailing-spaces': 1, // disallow trailing whitespace at the end of lines | ||
| 'no-underscore-dangle': 0, // disallow dangling underscores in identifiers | ||
| 'no-mixed-spaces-and-tabs': 1, // disallow mixed spaces and tabs for indentation | ||
| quotes: [1, 'single', 'avoid-escape'], // specify whether double or single quotes should be used | ||
| quotes: 0, // specify whether double or single quotes should be used (off by default) | ||
| 'quote-props': 0, // require quotes around object literal property names (off by default) | ||
| semi: 1, // require or disallow use of semicolons instead of ASI | ||
| semi: 0, // require or disallow use of semicolons instead of ASI (off by default) | ||
| 'sort-vars': 0, // sort variables within the same declaration block (off by default) | ||
| 'space-in-brackets': 0, // require or disallow spaces inside brackets (off by default) | ||
| 'space-in-parens': 0, // require or disallow spaces inside parentheses (off by default) | ||
|
|
@@ -309,5 +309,11 @@ module.exports = { | |
| 'jest/no-focused-tests': 1, | ||
| 'jest/no-identical-title': 1, | ||
| 'jest/valid-expect': 1, | ||
|
|
||
| // Prettier Plugin | ||
| 'prettier/prettier': [ | ||
|
iRoachie marked this conversation as resolved.
Outdated
|
||
| 1, | ||
| {singleQuote: true, trailingComma: 'es5', semi: true}, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @iRoachie - I wonder how this section is related to the default content of Does it override and/or make it (partially) obsolete?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure exactly, what i do know is that the contents of that file doesn’t get passed onto user projects and previously you had to have a .prettierrc of your own
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay thanks for your reply. If (part of?) that file is obsolete (after updating the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's still useful for formatting a file manually, and formatting non-js files such as markdown etc.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @satya164 - Thanks for your comment! Could you give an example (or a link to one)?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prettier can format a wide-range of files such as markdown files (including code inside markdown files). The ESLint config only applies to TypeScript and JS files. Not sure what kind of example you're expecting?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay never mind, I understand the reason. Thanks! |
||
| ], | ||
| }, | ||
| }; | ||
Uh oh!
There was an error while loading. Please reload this page.