Closed Uzlopak closed 1 year ago
If it would me, I would just rip out prettier and eslint and just use standard. but then people would complain that typescript files are not linted. So I just do this minimal patch, to get the CI green.
@gurgunday index.js contains code. Is it wrong?
Yeah but I thought eslint was using standard for .js files
@Eomm I'm really proud of this config that uses standard for everything except formatting, which prettier takes care of 😁
{
"root": true,
"extends": ["standard", "prettier"],
"plugins": ["github", "prettier"],
"rules": {
"no-restricted-syntax": [
"error",
"MethodDefinition[kind='get']",
"MethodDefinition[kind='set']",
"VariableDeclaration[kind='var']",
"WithStatement"
],
"github/array-foreach": "error",
"class-methods-use-this": "error",
"prefer-const": "error",
"prefer-destructuring": "error",
"prefer-exponentiation-operator": "error",
"prefer-named-capture-group": "error",
"prefer-numeric-literals": "error",
"prefer-object-has-own": "error",
"prefer-object-spread": "error",
"prefer-promise-reject-errors": "error",
"prefer-regex-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"prettier/prettier": "error",
"arrow-body-style": "error",
"curly": ["error", "all"],
"quotes": ["error", "double", { "avoidEscape": true }]
}
}
I'm really proud of this config that uses standard for everything except formatting, which prettier takes care of 😁
Here is my setup standard + typescript:
"lint:typescript": "standard --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin *.ts test/**/*.ts",
Checklist
npm run test
andnpm run benchmark