Skip to content

Instantly share code, notes, and snippets.

@pot-code
Last active May 17, 2021 07:59
Show Gist options
  • Save pot-code/8b4665ae0cb646b8d5a13816af9f7556 to your computer and use it in GitHub Desktop.
Save pot-code/8b4665ae0cb646b8d5a13816af9f7556 to your computer and use it in GitHub Desktop.
[typescript] #template #frontend
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.base.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin', 'import'],
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-function': 'off',
'import/order': [
'error',
{
groups: ['builtin', 'internal', 'external', 'sibling', 'parent'],
'newlines-between': 'always-and-inside-groups',
},
],
},
};
yarn add -D typescript eslint @typescript-eslint/eslint-plugin eslint-plugin-prettier @typescript-eslint/parser eslint-config-prettier eslint-plugin-import
{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"allowSyntheticDefaultImports": true,
"target": "es2017",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
"incremental": true,
"esModuleInterop": true,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment