bigbluebutton-Github/bigbluebutton-html5/.eslintrc.js

59 lines
1.6 KiB
JavaScript
Raw Normal View History

2017-06-03 02:55:23 +08:00
module.exports = {
extends: 'airbnb',
2021-04-10 02:02:18 +08:00
parserOptions: {
ecmaVersion: 2020,
},
plugins: ['react', 'jsx-a11y', 'import'],
2021-04-10 02:02:18 +08:00
env: {
es6: true,
node: true,
browser: true,
meteor: true,
jasmine: true,
},
rules: {
'no-underscore-dangle': 0,
'import/extensions': [2, 'never'],
'import/no-absolute-path': 0,
'import/no-unresolved': 0,
'import/no-extraneous-dependencies': 1,
'react/prop-types': 1,
'jsx-a11y/no-access-key': 0,
'react/jsx-props-no-spreading': 'off',
'max-classes-per-file': ['error', 2],
},
globals: {
browser: 'writable',
},
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: ['airbnb', 'eslint:recommended', 'plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
camelcase: 'off',
'no-use-before-define': 'off',
2023-09-13 22:31:20 +08:00
'arrow-body-style': 'off',
'no-shadow': 'off',
'import/no-absolute-path': 0,
'import/no-unresolved': 0,
'no-unused-vars': 0, // https://stackoverflow.com/a/63767419
'import/extensions': [2, 'never'],
2023-09-13 22:35:56 +08:00
'react/sort-comp': [0],
'react/jsx-filename-extension': ['error', { extensions: ['.tsx', '.jsx'] }],
'max-len': [
'error',
{
code: 120, // Maximum line length (characters)
tabWidth: 2, // Number of spaces per tab
ignoreUrls: true, // Ignore long URLs
ignoreStrings: true, // Ignore long strings
},
],
},
},
],
2017-06-03 02:55:23 +08:00
};