homebridge-prometheus-exporter/.eslintrc.js

57 lines
1.7 KiB
JavaScript
Raw Normal View History

2022-11-06 13:50:39 +01:00
module.exports = {
2022-11-08 19:36:50 +01:00
extends: ['eslint:recommended', 'plugin:import/recommended'],
2022-11-06 13:50:39 +01:00
parser: '@typescript-eslint/parser',
2022-11-08 19:36:50 +01:00
plugins: ['@typescript-eslint', 'prettier', 'import'],
2022-11-06 13:50:39 +01:00
root: true,
rules: {
'prettier/prettier': 'warn',
'prefer-arrow-callback': 'error',
2022-11-07 23:02:24 +01:00
'sort-imports': [
'error',
{
ignoreDeclarationSort: true,
},
],
2022-11-08 19:36:50 +01:00
'import/no-unresolved': 'error',
'import/no-extraneous-dependencies': 'error',
'import/first': 'error',
'import/no-duplicates': 'error',
'import/no-default-export': 'error',
'import/no-namespace': 'error',
'import/no-useless-path-segments': 'error',
2022-11-06 13:50:39 +01:00
},
overrides: [
{
files: ['**/*.ts'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
2022-11-08 19:36:50 +01:00
'plugin:import/typescript',
],
parserOptions: {
project: ['./tsconfig.json'],
},
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'error',
},
2022-11-08 19:36:50 +01:00
settings: {
'import/resolver': {
typescript: {
project: './',
},
},
},
},
2022-11-06 13:50:39 +01:00
{
files: ['.eslintrc.js', 'jest.config.js', 'prettier.config.js'],
env: {
node: true,
browser: false,
},
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
],
}