Timo Hocker
94ff6b5c18
All checks were successful
continuous-integration/drone/push Build is passing
66 lines
1.5 KiB
JavaScript
66 lines
1.5 KiB
JavaScript
/*
|
|
* Copyright (C) Sapphirecode - All Rights Reserved
|
|
* This file is part of eslint-config-ts which is released under MIT.
|
|
* See file 'LICENSE' for full license details.
|
|
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
|
*/
|
|
|
|
module.exports = {
|
|
|
|
globals: {},
|
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
extends: [
|
|
'@sapphirecode/eslint-config-es6',
|
|
'plugin:@typescript-eslint/eslint-recommended',
|
|
'plugin:@typescript-eslint/recommended'
|
|
],
|
|
|
|
plugins: [
|
|
'@typescript-eslint',
|
|
'eslint-plugin-tsdoc'
|
|
],
|
|
|
|
parserOptions: {
|
|
sourceType: 'module',
|
|
parser: 'babel-eslint'
|
|
},
|
|
|
|
settings: {
|
|
'import/parsers': {
|
|
'@typescript-eslint/parser': ['.ts', '.tsx']
|
|
}
|
|
},
|
|
|
|
rules: {
|
|
'@typescript-eslint/camelcase': 'off',
|
|
'@typescript-eslint/naming-convention': ['error',
|
|
{ selector: 'default', format: ['snake_case'] },
|
|
{ selector: 'typeLike', format: ['PascalCase'] },
|
|
{
|
|
selector: 'property',
|
|
modifiers: ['private'],
|
|
format: ['snake_case'],
|
|
leadingUnderscore: 'require'
|
|
},
|
|
{
|
|
selector: 'variable',
|
|
modifier: 'destructured',
|
|
format: null
|
|
},
|
|
{
|
|
selector: 'variable',
|
|
modifier: ['const', 'global'],
|
|
format: ['UPPEER_CASE', 'snake_case']
|
|
}
|
|
],
|
|
'@typescript-eslint/no-use-before-define': 'off',
|
|
'tsdoc/syntax': 'error',
|
|
// deactivating commonjs rules
|
|
'id-match': 'off',
|
|
'no-underscore-dangle': 'off',
|
|
'node/no-missing-import': 'off'
|
|
}
|
|
}
|