2020-04-06 11:56:05 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) Sapphirecode - All Rights Reserved
|
|
|
|
* This file is part of SCode-Eslint-Config which is released under BSD-3-Clause.
|
|
|
|
* See file 'LICENSE' for full license details.
|
|
|
|
* Created by Timo Hocker <timo@scode.ovh>, March 2020
|
|
|
|
*/
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
|
|
|
globals: {},
|
|
|
|
|
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
|
|
|
|
extends: [
|
2020-04-06 13:58:55 +02:00
|
|
|
'@scode/eslint-config-es6',
|
2020-04-06 11:56:05 +02:00
|
|
|
'plugin:@typescript-eslint/eslint-recommended',
|
|
|
|
'plugin:@typescript-eslint/recommended'
|
|
|
|
],
|
|
|
|
|
|
|
|
plugins: [
|
|
|
|
'@typescript-eslint'
|
|
|
|
],
|
|
|
|
|
|
|
|
parserOptions: {
|
|
|
|
sourceType: 'module',
|
|
|
|
parser: 'babel-eslint'
|
|
|
|
},
|
|
|
|
|
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'] },
|
|
|
|
{ selector: 'memberLike', modifiers: ['private'], format: ['snake_case'], leadingUnderscore: 'require' },
|
|
|
|
{ selector: 'typeLike', format: ['PascalCase'] }
|
2020-04-08 11:44:45 +02:00
|
|
|
],
|
2020-04-08 11:45:56 +02:00
|
|
|
'id-match': ['error', '^([a-z][a-z0-9_]*|[A-Z][a-zA-Z]*)$', { onlyDeclarations: true }]
|
2020-04-08 11:12:43 +02:00
|
|
|
}
|
2020-04-06 11:56:05 +02:00
|
|
|
}
|