mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 02:18:31 -07:00
7b65dc631b
* Enable Typescript * Fix tests * Fix tests again * Automatically (re)build * Updates * Updates * Update shrinkwrap * Enable sourcemaps
46 lines
1.4 KiB
JavaScript
46 lines
1.4 KiB
JavaScript
|
|
module.exports = {
|
|
'env': {
|
|
'jest/globals': true,
|
|
'es6': true,
|
|
'node': true,
|
|
},
|
|
'extends': ['eslint:recommended', 'google', 'plugin:jest/recommended', 'plugin:jest/style'],
|
|
'parserOptions': {
|
|
'ecmaVersion': 2018,
|
|
'sourceType': 'module',
|
|
},
|
|
'rules': {
|
|
'require-jsdoc': 'off',
|
|
'indent': ['error', 4],
|
|
'max-len': ['error', {'code': 120}],
|
|
'no-prototype-builtins': 'off',
|
|
},
|
|
'plugins': [
|
|
'jest',
|
|
],
|
|
'overrides': [{
|
|
files: ['*.ts'],
|
|
parser: '@typescript-eslint/parser',
|
|
plugins: ['@typescript-eslint'],
|
|
extends: ['plugin:@typescript-eslint/recommended'],
|
|
parserOptions: {
|
|
project: './tsconfig.json',
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/await-thenable': 'error',
|
|
'@typescript-eslint/ban-ts-ignore': 'off',
|
|
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
'@typescript-eslint/no-empty-function': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
'@typescript-eslint/no-unused-vars': 'error',
|
|
'@typescript-eslint/semi': ['error'],
|
|
'array-bracket-spacing': ['error', 'never'],
|
|
'indent': ['error', 4],
|
|
'max-len': ['error', {'code': 120}],
|
|
'no-return-await': 'error',
|
|
'object-curly-spacing': ['error', 'never'],
|
|
},
|
|
}],
|
|
};
|