2020-04-06 11:56:05 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) Sapphirecode - All Rights Reserved
|
2020-05-17 19:07:23 +02:00
|
|
|
* This file is part of eslint-config-ts which is released under MIT.
|
2020-04-06 11:56:05 +02:00
|
|
|
* See file 'LICENSE' for full license details.
|
2020-05-17 19:07:23 +02:00
|
|
|
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
2020-04-06 11:56:05 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
|
|
|
globals: {},
|
|
|
|
|
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
|
|
|
|
extends: [
|
2020-05-06 07:37:27 +02:00
|
|
|
'@sapphirecode/eslint-config-es6',
|
2020-04-06 11:56:05 +02:00
|
|
|
'plugin:@typescript-eslint/eslint-recommended',
|
|
|
|
'plugin:@typescript-eslint/recommended'
|
|
|
|
],
|
|
|
|
|
|
|
|
plugins: [
|
2020-05-07 19:16:22 +02:00
|
|
|
'@typescript-eslint',
|
|
|
|
'eslint-plugin-tsdoc'
|
2020-04-06 11:56:05 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
parserOptions: {
|
|
|
|
sourceType: 'module',
|
|
|
|
parser: 'babel-eslint'
|
|
|
|
},
|
|
|
|
|
2020-04-09 09:05:38 +02:00
|
|
|
settings: {
|
|
|
|
'import/parsers': {
|
|
|
|
'@typescript-eslint/parser': ['.ts', '.tsx']
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2020-04-08 11:12:43 +02:00
|
|
|
rules: {
|
|
|
|
'@typescript-eslint/camelcase': 'off',
|
|
|
|
'@typescript-eslint/naming-convention': ['error',
|
2020-04-08 11:18:01 +02:00
|
|
|
{ selector: 'default', format: ['snake_case'] },
|
2020-04-27 10:07:08 +02:00
|
|
|
{ selector: 'typeLike', format: ['PascalCase'] },
|
|
|
|
{
|
|
|
|
selector: 'property',
|
|
|
|
modifiers: ['private'],
|
|
|
|
format: ['snake_case'],
|
|
|
|
leadingUnderscore: 'require'
|
2021-02-02 14:35:53 +01:00
|
|
|
},
|
|
|
|
{
|
2021-03-11 20:56:14 +01:00
|
|
|
selector: 'variable',
|
2021-03-11 21:04:33 +01:00
|
|
|
modifiers: ['destructured'],
|
2021-03-11 20:56:14 +01:00
|
|
|
format: null
|
|
|
|
},
|
|
|
|
{
|
|
|
|
selector: 'variable',
|
2021-03-11 21:04:33 +01:00
|
|
|
modifiers: ['const', 'global'],
|
2021-03-11 21:08:18 +01:00
|
|
|
format: ['UPPER_CASE', 'snake_case']
|
2021-03-15 21:27:31 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
selector: 'objectLiteralProperty',
|
|
|
|
format: ['camelCase', 'snake_case']
|
2020-04-27 10:07:08 +02:00
|
|
|
}
|
2020-04-08 11:44:45 +02:00
|
|
|
],
|
2020-05-06 15:46:34 +02:00
|
|
|
'@typescript-eslint/no-use-before-define': 'off',
|
2020-05-07 19:16:22 +02:00
|
|
|
'tsdoc/syntax': 'error',
|
|
|
|
// deactivating commonjs rules
|
2021-03-11 21:00:03 +01:00
|
|
|
'id-match': 'off',
|
2020-05-13 21:20:17 +02:00
|
|
|
'no-underscore-dangle': 'off',
|
2020-05-13 21:23:59 +02:00
|
|
|
'node/no-missing-import': 'off'
|
2020-04-08 11:12:43 +02:00
|
|
|
}
|
2020-04-06 11:56:05 +02:00
|
|
|
}
|