nodebb-plugin-emoji/.eslintrc.js

61 lines
1.8 KiB
JavaScript
Raw Permalink Normal View History

module.exports = {
2023-07-04 21:27:45 -06:00
extends: [
'airbnb-base',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
],
parser: '@typescript-eslint/parser',
2023-07-04 21:27:45 -06:00
parserOptions: {
extraFileExtensions: ['.svelte'], // This is a required setting in `@typescript-eslint/parser` v4.24.0
},
2021-02-22 19:13:03 -07:00
plugins: [
'@typescript-eslint',
],
overrides: [
{
files: ['*.svelte'],
2023-07-04 21:27:45 -06:00
parser: 'svelte-eslint-parser',
// Parse the `<script>` in `.svelte` as TypeScript by adding the following configuration.
parserOptions: {
parser: '@typescript-eslint/parser',
},
2021-02-22 19:13:03 -07:00
rules: {
'@typescript-eslint/indent': 'off',
'no-label-var': 'off',
'import/first': 'off',
'import/no-cycle': 'off',
'import/no-mutable-exports': 'off',
},
},
],
rules: {
2021-02-22 19:13:03 -07:00
camelcase: 'off',
'no-undef': 'off',
'prefer-destructuring': 'off',
'no-param-reassign': 'warn',
'comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
2021-02-22 19:13:03 -07:00
functions: 'never',
}],
'import/no-unresolved': 'off',
'import/prefer-default-export': 'off',
'import/extensions': 'off',
'no-return-await': 'off',
'operator-linebreak': ['error', 'after'],
'object-curly-newline': ['error', {
multiline: true,
minProperties: 5,
2021-02-22 19:13:03 -07:00
consistent: true,
}],
2024-11-09 14:39:06 -07:00
'no-unsafe-optional-chaining': 'off',
2021-02-03 21:35:21 -07:00
'arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-empty-function': 'off',
2021-02-22 19:13:03 -07:00
'@typescript-eslint/explicit-module-boundary-types': ['error', { allowArgumentsExplicitlyTypedAsAny: true }],
},
};