Skip to content

Instantly share code, notes, and snippets.

@clouedoc
Created March 21, 2022 16:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clouedoc/b7152fefd639504b4892ce9952f57960 to your computer and use it in GitHub Desktop.
Save clouedoc/b7152fefd639504b4892ce9952f57960 to your computer and use it in GitHub Desktop.
My .eslintrc
// This is a workaround for https://github.com/eslint/eslint/issues/3458
require('@rushstack/eslint-config/patch/modern-module-resolution');
var isDev = process.env.NODE_ENV === "development";
module.exports = {
root: true,
extends: [
"@rushstack/eslint-config/profile/node",
"@rushstack/eslint-config/mixins/friendly-locals",
"@rushstack/eslint-config/mixins/packlets"
], // <---- put your profile string here
parserOptions: { tsconfigRootDir: __dirname },
env: {
es6: true
},
ignorePatterns: [],
rules: {
// This rule reduces performance by 84%, so only enabled during CI.
"@typescript-eslint/no-floating-promises": isDev ? "off" : "error",
"@typescript-eslint/no-invalid-this": "error"
},
overrides: [
{
files: ["src/packlets/scripts/*", "*.spec.ts"],
rules: {
"@rushstack/packlets/mechanics": 0
}
},
{
files: ['**/schemas/*.ts'],
rules: {
"@typescript-eslint/typedef": 0
}
},
{
files: ['src/commands/**'],
rules: {
"@typescript-eslint/typedef": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
}
}
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment