Skip to content

Instantly share code, notes, and snippets.

@jblyberg
Last active December 8, 2021 16:07
Show Gist options
  • Save jblyberg/7536e07514c497d07f4f7ab3e07a416a to your computer and use it in GitHub Desktop.
Save jblyberg/7536e07514c497d07f4f7ab3e07a416a to your computer and use it in GitHub Desktop.
Typescript linting example
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:unicorn/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',
'unicorn/filename-case': 'off',
},
};
{
"compilerOptions": {
"module": "commonjs",
"declaration": true,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2017",
"sourceMap": true,
"outDir": "./dist",
"baseUrl": "./",
"incremental": true,
"paths": {
"@common/*": ["src/common/*"],
"@lib/*": ["src/lib/*"],
"@modules/*": ["src/modules/*"],
}
},
"exclude": ["node_modules", "dist"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment