34 lines
714 B
JavaScript
34 lines
714 B
JavaScript
module.exports = {
|
|
env: {
|
|
browser: true,
|
|
es2021: true,
|
|
},
|
|
extends: [
|
|
'plugin:react/recommended',
|
|
'airbnb',
|
|
],
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
ecmaVersion: 12,
|
|
sourceType: 'module',
|
|
},
|
|
plugins: [
|
|
'react',
|
|
],
|
|
rules: {
|
|
// Indent with 4 spaces
|
|
indent: ['error', 4],
|
|
|
|
// Indent JSX with 4 spaces
|
|
'react/jsx-indent': ['error', 4],
|
|
|
|
// Indent props with 4 spaces
|
|
'react/jsx-indent-props': ['error', 4],
|
|
|
|
// allow JSX in both js and jsx files
|
|
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
|
|
},
|
|
};
|