-
-
Save lynnkwong/a3300c1b8e0a38348a619bfafcb6812d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
env: { | |
browser: true, | |
es2021: true | |
}, | |
extends: [ | |
'standard', | |
'eslint:recommended', | |
], | |
parser: '@typescript-eslint/parser', | |
parserOptions: { | |
ecmaVersion: 'latest', | |
sourceType: 'module', | |
}, | |
plugins: [ | |
'@typescript-eslint' // For TypeScript. | |
], | |
overrides: [ // Use `overrides` so ESLint can check both JS and TS files. | |
{ | |
files: ['*.ts', '*.tsx'], | |
extends: [ | |
'plugin:@typescript-eslint/recommended', | |
'plugin:@typescript-eslint/recommended-requiring-type-checking', | |
], | |
parserOptions: { | |
tsconfigRootDir: __dirname, | |
project: ['./tsconfig.json'], | |
}, | |
}, | |
], | |
ignorePatterns: ['.eslintrc.js'], | |
rules: { | |
quotes: ["error", "double"], // Use double quotes. | |
semi: ["error", "always"], // Always add a semicolon at the end statements. | |
indent: ["error", 2], // Indentation is two spaces. | |
"no-console": "error" // Avoid using methods on `console` in the code. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment