-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix linting #168
fix linting #168
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but index.js is also in the prettier script, is that intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will die without seeing prettier and eslint working fine together on the first try.
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 |
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 }]
}
} |
|
Here is my setup standard + typescript:
|
Checklist
npm run test
andnpm run benchmark
and the Code of conduct