simonflex-framework
Version:
A library implements Meter Flex interface
180 lines (178 loc) • 4.85 kB
JavaScript
module.exports = {
env: {
browser: true,
es6: true,
},
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint', '@typescript-eslint/tslint'],
rules: {
'@typescript-eslint/adjacent-overload-signatures': 'warn',
'@typescript-eslint/array-type': 'warn',
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/class-name-casing': 'warn',
'@typescript-eslint/consistent-type-assertions': 'warn',
'@typescript-eslint/consistent-type-definitions': 'warn',
'@typescript-eslint/explicit-member-accessibility': [
'warn',
{
accessibility: 'explicit',
},
],
'@typescript-eslint/indent': [
'warn',
4,
{
FunctionDeclaration: {
parameters: 'first',
},
FunctionExpression: {
parameters: 'first',
},
},
],
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/member-delimiter-style': [
'warn',
{
multiline: {
delimiter: 'none',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
},
],
'@typescript-eslint/member-ordering': 'warn',
'@typescript-eslint/no-empty-function': 'warn',
'@typescript-eslint/no-empty-interface': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-misused-new': 'warn',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/prefer-for-of': 'warn',
'@typescript-eslint/prefer-function-type': 'warn',
'@typescript-eslint/prefer-namespace-keyword': 'warn',
'@typescript-eslint/quotes': ['warn', 'single'],
'@typescript-eslint/semi': ['warn', 'never'],
'@typescript-eslint/triple-slash-reference': 'warn',
'@typescript-eslint/type-annotation-spacing': 'warn',
'@typescript-eslint/unified-signatures': 'warn',
'arrow-body-style': 'warn',
'arrow-parens': ['off', 'as-needed'],
camelcase: 'warn',
'comma-dangle': 'off',
complexity: 'off',
'constructor-super': 'warn',
curly: 'warn',
'dot-notation': 'warn',
'eol-last': 'warn',
eqeqeq: ['warn', 'smart'],
'guard-for-in': 'warn',
'id-blacklist': [
'warn',
'any',
'Number',
'number',
'String',
'string',
'Boolean',
'boolean',
'Undefined',
'undefined',
],
'id-match': 'warn',
'import/order': 'off',
'max-classes-per-file': 'off',
'max-len': [
'warn',
{
code: 120,
},
],
'new-parens': 'warn',
'no-bitwise': 'warn',
'no-caller': 'warn',
'no-cond-assign': 'warn',
'no-console': 'warn',
'no-debugger': 'warn',
'no-empty': 'warn',
'no-eval': 'warn',
'no-fallthrough': 'off',
'no-invalid-this': 'off',
'no-multiple-empty-lines': 'warn',
'no-new-wrappers': 'warn',
'no-shadow': [
'warn',
{
hoist: 'all',
},
],
'no-throw-literal': 'warn',
'no-trailing-spaces': 'warn',
'no-undef-init': 'warn',
'no-underscore-dangle': 'warn',
'no-unsafe-finally': 'warn',
'no-unused-expressions': 'warn',
'no-unused-labels': 'warn',
'no-var': 'warn',
'object-shorthand': 'warn',
'one-var': ['warn', 'never'],
'prefer-arrow/prefer-arrow-functions': 'warn',
'prefer-const': 'warn',
'quote-props': ['warn', 'consistent-as-needed'],
radix: 'warn',
'space-before-function-paren': [
'warn',
{
anonymous: 'never',
asyncArrow: 'always',
named: 'never',
},
],
'spaced-comment': 'warn',
'use-isnan': 'warn',
'valid-typeof': 'off',
'@typescript-eslint/tslint/config': [
'error',
{
rules: {
'import-spacing': true,
'jsdoc-format': true,
'no-reference-import': true,
'one-line': [
true,
'check-catch',
'check-else',
'check-finally',
'check-open-brace',
'check-whitespace',
],
whitespace: [
true,
'check-branch',
'check-decl',
'check-operator',
'check-separator',
'check-type',
'check-typecast',
],
},
},
],
},
};
// "@typescript-eslint/eslint-plugin": "^2.30.0",
// "@typescript-eslint/parser": "^2.30.0",
// "eslint": "^6.8.0",