Skip to content

Instantly share code, notes, and snippets.

@audacioustux
Last active October 1, 2019 07:21
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 audacioustux/fda8b06eeb0b78724a820ba59789e6b4 to your computer and use it in GitHub Desktop.
Save audacioustux/fda8b06eeb0b78724a820ba59789e6b4 to your computer and use it in GitHub Desktop.
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
"airbnb-base",
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
],
plugins: ["@typescript-eslint"],
parserOptions: {
"project": "./tsconfig.json"
},
rules: {
"no-dupe-keys": "error",
"import/newline-after-import": ["error", { "count": 2 }],
"import/no-named-as-default": 0,
"object-curly-spacing": ["error", "always"],
"max-len": ["warn", {
"code": 100,
"ignoreRegExpLiterals": true,
"ignoreUrls": true,
}],
"semi": "off",
"@typescript-eslint/semi": 2,
"semi-style": ["error", "last"],
"semi-spacing": ["error", { "before": false, "after": true }],
"arrow-parens": ["error", "always"],
"arrow-body-style": ["error", "as-needed"],
"no-var": "error",
"prefer-const": "error",
'no-console': 'warn',
"object-shorthand": "error",
"quotes": ["error", "single"],
"eol-last": 1,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"no-multiple-empty-lines": ["error", { "max": 2, "maxBOF": 0, "maxEOF": 0 }],
'prefer-destructuring': [
'error', {
VariableDeclarator: {
array: false,
object: true,
},
AssignmentExpression: {
array: true,
object: true,
},
}, {
enforceForRenamedProperties: false,
}
],
}
}
{
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
"target": "esnext",
"noImplicitAny": true,
"strict": true,
"resolveJsonModule": true,
"strictNullChecks": true,
"moduleResolution": "node",
"sourceMap": true,
"outDir": "build",
"baseUrl": ".",
"paths": {
"*": ["node_modules/*", "src/types/*"]
}
},
"include": ["src"]
}
{
"watch": [
"src"
],
"verbose": false,
"env": {
"nodemon": true
},
"exec": "npm run build && ./scripts/wait-port.sh $PORT && npm start",
"ext": "ts"
}
{
"scripts": {
"watch:ts": "tsc -w -p tsconfig.json --preserveWatchOutput",
"build:ts": "tsc -p tsconfig.json",
"build": "npm run ts-build",
"start": "node ./build",
"start:watch": "PORT=4000 nodemon",
"dev": "npm run docker:reset && npm run start:watch"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^1.13.0",
"@typescript-eslint/parser": "^1.13.0",
"eslint": "^6.1.0",
"eslint-config-airbnb-base": "^13.2.0",
"eslint-plugin-import": "^2.18.2",
"nodemon": "^1.19.1",
"ts-node": "^8.3.0",
"typescript": "^3.6.0-dev.20190606"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment