mirror of
https://github.com/owncast/owncast.git
synced 2024-12-27 03:28:30 +03:00
6112c43817
* chore(deps): update dependency eslint-plugin-react to v7.32.0 * Turn off react/destructuring-assignment Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Gabe Kangas <gabek@real-ity.com>
85 lines
2 KiB
JavaScript
85 lines
2 KiB
JavaScript
module.exports = {
|
|
env: {
|
|
browser: true,
|
|
es2021: true,
|
|
},
|
|
extends: [
|
|
'plugin:react/recommended',
|
|
'airbnb',
|
|
'prettier',
|
|
'plugin:@next/next/recommended',
|
|
'plugin:storybook/recommended',
|
|
],
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
ecmaVersion: 12,
|
|
sourceType: 'module',
|
|
},
|
|
plugins: ['react', 'prettier', '@typescript-eslint'],
|
|
ignorePatterns: ['!./storybook/**'],
|
|
rules: {
|
|
'prettier/prettier': 'error',
|
|
'react/destructuring-assignment': 'off',
|
|
'react/prop-types': 0,
|
|
'react/react-in-jsx-scope': 'off',
|
|
'react/require-default-props': 'off',
|
|
'react/jsx-filename-extension': [
|
|
1,
|
|
{
|
|
extensions: ['.js', '.jsx', '.tsx'],
|
|
},
|
|
],
|
|
'react/jsx-props-no-spreading': 'off',
|
|
'react/jsx-no-bind': 'off',
|
|
'react/function-component-definition': [
|
|
'warn',
|
|
{
|
|
namedComponents: 'arrow-function',
|
|
unnamedComponents: 'arrow-function',
|
|
},
|
|
],
|
|
'@next/next/no-img-element': 'off',
|
|
'no-unused-vars': 'off',
|
|
'@typescript-eslint/no-unused-vars': 'error',
|
|
'no-console': 'off',
|
|
'no-use-before-define': [0],
|
|
'@typescript-eslint/no-use-before-define': [0],
|
|
'no-shadow': 'off',
|
|
'@typescript-eslint/no-shadow': ['error'],
|
|
'no-restricted-exports': 'off',
|
|
'react/jsx-no-target-blank': [
|
|
1,
|
|
{
|
|
allowReferrer: false,
|
|
enforceDynamicLinks: 'always',
|
|
},
|
|
],
|
|
'import/extensions': [
|
|
'error',
|
|
'ignorePackages',
|
|
{
|
|
js: 'never',
|
|
jsx: 'never',
|
|
ts: 'never',
|
|
tsx: 'never',
|
|
},
|
|
],
|
|
'import/no-extraneous-dependencies': [
|
|
'error',
|
|
{
|
|
devDependencies: ['**/*.stories.*', '**/.storybook/**/*.*'],
|
|
peerDependencies: true,
|
|
},
|
|
],
|
|
},
|
|
settings: {
|
|
'import/resolver': {
|
|
node: {
|
|
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
},
|
|
},
|
|
},
|
|
};
|