I use prettier and tslint, with https://github.com/alexjoverm/tslint-config-prettier and https://github.com/ikatyang/tslint-plugin-prettier .
My tslint.json
is like
{
"defaultSeverity": "error",
"extends": [
"tslint-config-airbnb",
"tslint-react",
"tslint-config-prettier"
],
"jsRules": {},
"rules": {
"max-line-length": [true, 80],
"import-name": false,
"variable-name": false,
"jsx-boolean-value": false,
"jsx-no-multiline-js": false,
"no-else-after-return": false,
"object-shorthand-properties-first": false,
"ter-arrow-parens": false,
"ter-indent": false,
"prettier": true
},
"rulesDirectory": ["tslint-plugin-prettier"]
}
And my .prettierrc
is like
{
"trailingComma": "all",
"singleQuote": true
}
After tslint --fix "src/**/*.ts"
, codes like below appears:
import { getChildrenProceduresSelector } from '@src/entities/procedures/selectors';
And the error says [tslint] Exceeds maximum line length of 80 (max-line-length)
.
But when I fix it manually to
import {
getChildrenProceduresSelector,
} from '@src/entities/procedures/selectors';
It says
[tslint] Replace `⏎··getChildrenProceduresSelector,⏎` with `·getChildrenProceduresSelector·` (prettier)
I use VSCode with tslint and prettier extensions. My tslint command says the same error. How to fix this conflicts?