Closed jlchereau closed 6 years ago
For example but with 28 spaces:
Environment
Full configuration:
{ "env": { "node": true, "es6": true }, "extends": [ "airbnb-base", "plugin:node/recommended", "prettier" ], "parser": "esprima", "plugins": [ "node", "prettier" ], "root": true, "rules": { "indent": ["error", 4, { "SwitchCase": 1 }], "no-plusplus": ["error", { "allowForLoopAfterthoughts": true }], "no-underscore-dangle": 0, "node/exports-style": ["error", "module.exports"], "prettier/prettier": ["error", { "singleQuote": true, "tabWidth": 4 }] } }
And for .prettierrc
{ "singleQuote": true, "tabWidth": 4 }
*Source code causing the issue.**
Any code that has a long a ? b : c statement will trigger the conflict:
new PageComponent({ tool: 'textbox', top: 380, left: 80, width: 380, height: 100, properties: { question: options.question, solution: solutions[0], validation: solutions.length > 1 ? `// ignoreCaseMatch ${JSON.stringify([ `^(?:${escaped.join('|')})$` ])}` : '// ignoreCaseEqual' } })
This runs In WebStorm with the following config:
But also using grunt-eslint configured in grunfile.js as follows:
eslint: { files: [ '*.js', 'templates/*.es6', 'src/js/**/*.es6', 'test/**/*.es6' ], options: { config: '.eslintrc' } },
Remove this line from your ESLint config:
"indent": ["error", 4, { "SwitchCase": 1 }],
For example but with 28 spaces:
Environment
Full configuration:
And for .prettierrc
*Source code causing the issue.**
Any code that has a long a ? b : c statement will trigger the conflict:
This runs In WebStorm with the following config:
But also using grunt-eslint configured in grunfile.js as follows: