Not working properly width eslint 6
See original GitHub issueVersions:
prettier-eslint
9.0.0:node
10.15.3:npm
(oryarn
) version: 6.10.0
Have you followed the debugging tips?
Yes
Relevant code or config https://github.com/prettier/prettier-eslint/blob/c87b69b769c59bcea0d96c87dddb6a4925085d8a/src/index.js#L225-L243
const eslintOptions = {};
if (filePath) {
eslintOptions.cwd = path.dirname(filePath);
}
logger.trace(
oneLine`
creating ESLint CLI Engine to get the config for
"${filePath || process.cwd()}"
`
);
const cliEngine = getESLintCLIEngine(eslintPath, eslintOptions);
try {
logger.debug(`getting eslint config for file at "${filePath}"`);
const config = cliEngine.getConfigForFile(filePath);
+ config.cwd = eslintOptions.cwd
logger.trace(
`eslint config for "${filePath}" received`,
prettyFormat(config)
);
return config;
What I did:
Support eslint 6
What happened: when I set “prettier.eslintIntegration”: true then the error happend in VSCode
Failed to load plugin 'standard' declared in 'CLIOptions'/Users/nashaofu/edc/web/src/c.js:: Cannot find module 'eslint-plugin-standard'
Require stack:
- __placeholder__.js
My eslint configuration is as follows:
module.exports = {
root: true,
parser: 'babel-eslint',
env: {
es6: true,
node: true,
commonjs: true
},
extends: ['standard']
}
Problem description:
The CWD of the process pointed incorrectly
Suggested solution: details https://github.com/prettier/prettier-vscode/issues/869
Issue Analytics
- State:
- Created 4 years ago
- Reactions:40
- Comments:13 (2 by maintainers)
Top Results From Across the Web
Prettier and eslint indents not working together - Stack Overflow
Probably 'eslint' says: indent: Expected indentation of 2 spaces but found 4. after prettier reformat. My .eslintrc.js : module.exports = { ...
Read more >indent - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >How to configure Prettier and VSCode - Gleb Bahmutov
You can configure JavaScript code auto-formatting with Prettier to work per-project. This allows you to get a consistent formatting without ...
Read more >ESLint and Prettier with Vite and Vue.js 3 - Vue School Blog
As far as I can tell, there are no special configs to get it working properly with ESLint and Prettier. Just install it...
Read more >Google JavaScript Style Guide
Like other programming style guides, the issues covered span not only aesthetic issues of formatting, but other types of conventions or coding standards...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any news on this?
When open source fails