UNPKG

@amcef/eslint-config-node

Version:

AMCEF eslint config for NodeJS

95 lines (93 loc) 2 kB
module.exports = { env: { es6: true, node: true, jest: true, }, parserOptions: { parser: '@typescript-eslint/parser', ecmaVersion: 2018, sourceType: 'module', }, plugins: [ '@typescript-eslint', 'import', ], settings: { 'import/resolver': { typescript: {}, }, }, extends: [ 'airbnb-base', 'airbnb-typescript/base', 'plugin:@typescript-eslint/recommended', 'plugin:import/recommended', ], rules: { 'import/order': [ 'error', { groups: [['builtin', 'external'], 'internal', ['index', 'sibling', 'parent', 'object']], pathGroupsExcludedImportTypes: ['builtin'], pathGroups: [ { pattern: '@**/**', group: 'external', position: 'after', }, ], 'newlines-between': 'always-and-inside-groups', alphabetize: { order: 'asc', caseInsensitive: true, }, }, ], 'max-len': [ 'error', { code: 100, ignoreTemplateLiterals: true, }, ], indent: [ 'error', 2, ], 'linebreak-style': [ 'error', 'unix', ], quotes: [ 'error', 'single', ], semi: [ 'error', 'always', ], '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-empty-interface': 'off', '@typescript-eslint/space-before-function-paren': ['error', 'always'], 'import/prefer-default-export': 'off', 'import/no-cycle': 'off', 'class-methods-use-this': 'off', 'implicit-arrow-linebreak': 'off', 'no-promise-executor-return': 'off', 'no-underscore-dangle': 'off', 'no-restricted-syntax': 'off', 'no-param-reassign': 'off', 'no-await-in-loop': 'off', 'no-continue': 'off', 'operator-linebreak': [ 'error', 'after', { overrides: { '?': 'before', ':': 'before', }, }, ], }, };