docusaurus/v2/.eslintrc.js

36 lines
1.0 KiB
JavaScript
Raw Normal View History

/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
2018-09-16 23:34:42 -04:00
const OFF = 0;
const WARNING = 1;
const ERROR = 2;
module.exports = {
env: {
browser: true,
commonjs: true,
jest: true,
node: true,
},
extends: ['airbnb', 'prettier', 'prettier/react'],
2018-10-27 03:06:05 -04:00
plugins: ['react-hooks'],
2018-09-16 23:34:42 -04:00
rules: {
'no-console': OFF,
'func-names': OFF,
'jsx-a11y/click-events-have-key-events': OFF, // Revisit in future™
'jsx-a11y/no-noninteractive-element-interactions': OFF, // Revisit in future™
'react/jsx-closing-bracket-location': OFF, // Conflicts with Prettier.
2018-09-16 23:34:42 -04:00
'react/jsx-filename-extension': OFF,
'react/jsx-one-expression-per-line': OFF,
'react/prop-types': OFF,
'react/destructuring-assignment': OFF, // Too many lines.
'import/no-unresolved': WARNING, // Because it couldn't resolve webpack alias.
2018-09-16 23:34:42 -04:00
'react/prefer-stateless-function': WARNING,
2018-10-27 03:06:05 -04:00
'react-hooks/rules-of-hooks': ERROR,
2018-09-16 23:34:42 -04:00
},
};