eslint-plugin-arca
eslint-plugin-arca copied to clipboard
ESLint error 'orientation' property undefined with input element with autoComplete defined in react jsx
Error while running ESLint: Cannot read property 'orientation' of undefined.
Had the following defined in my React JSX file
type="text"
className="pb-0"
onFocus={ () => {} }
onChange={ (e) => {
e.preventDefault();
handleSearch(e);
} }
onBlur={ resetField }
value={ inputValue }
name={ prop.name }
id={ prop.name }
autoComplete="off" <------ threw the error
ref={ setInputRef }
/>
var path = require('path');
module.exports = {
root: true,
env: {
browser: true,
commonjs: true,
es2021: true,
},
globals: {
_: false,
angular: false,
$: false,
location: false,
jQuery: false,
Swal: false,
EXIF: false,
__ENV__: false,
},
parser: '@babel/eslint-parser',
parserOptions: {
sourceType: 'module',
ecmaVersion: 12,
allowImportExportEverywhere: true,
},
settings: {
'import/resolver': {
alias: [
['COMPONENT', path.resolve('src/components')],
['API', path.resolve('src/api')],
['ASSETS', path.resolve('assets')],
['APPS', path.resolve('src/apps')],
['APP', path.resolve('src/app')],
['DATA', path.resolve('src/data')],
['UTILS', path.resolve('src/utils')],
['VENDOR', path.resolve('vendor')],
],
},
'import/extensions': [
'.js',
'.jsx',
],
},
extends: [
'eslint:recommended',
'plugin:jsx-a11y/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
// 'plugin:import/recommended',
// 'plugin:prettier/recommended',
],
plugins: ['arca', 'react', 'jsx-a11y'],
rules: {
// 'arca/import-align': 2,
// 'arca/import-ordering': 2,
'brace-style': ['error'],
camelcase: 0,
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'never',
},
],
'func-names': ['off'],
'global-require': 0,
'guard-for-in': 0,
indent: ['error', 2],
'jsx-a11y/click-events-have-key-events': 0,
'jsx-a11y/label-has-for': 0,
'jsx-a11y/label-has-associated-control': 0,
'jsx-a11y/media-has-caption': 0,
'jsx-a11y/no-noninteractive-element-interactions': 0,
'jsx-a11y/no-static-element-interactions': 0,
'max-len': [
'error',
{
code: 140,
tabWidth: 4,
ignoreComments: true,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
},
],
'new-cap': 0,
'no-fallthrough': 0,
'no-multi-spaces': [
'error',
{
exceptions: {
ImportDeclaration: true,
VariableDeclarator: true,
},
},
],
'no-param-reassign': 0,
'no-plusplus': [
1,
{
allowForLoopAfterthoughts: true,
},
],
'no-restricted-syntax': ['error', 'ForOfStatement', 'LabeledStatement', 'WithStatement'],
'no-tabs': 0,
'no-mixed-spaces-and-tabs': ['error', 'smart-tabs'],
// 'no-restricted-imports': [2, {
// 'patterns': ['.*'],
// }],
// 'no-restricted-modules': [2, {
// 'patterns': ['.*'],
// }],
'no-underscore-dangle': [
1,
{
allow: ['__REDUX_DEVTOOLS_EXTENSION__', '_isMounted'],
},
],
'no-unused-expressions': [
'error',
{
allowShortCircuit: true,
allowTernary: true,
},
],
'no-unused-vars': 1,
'no-use-before-define': 0,
'no-var': ['off'],
'object-shorthand': ['off'],
'prefer-arrow-callback': ['off'],
'prefer-destructuring': [
'error',
{
object: true,
array: false,
},
],
'prefer-template': ['off'],
// 'prettier/prettier': [
// 'error',
// {
// singleQuote: true,
// bracketSpacing: true,
// tabWidth: 2,
// printWidth: 200,
// },
// ],
quotes: ['error', 'single'],
radix: 0,
'react/destructuring-assignment': 0,
'react/jsx-curly-spacing': [
2,
{
when: 'always',
spacing: {
objectLiterals: 'never',
},
},
],
'react/jsx-filename-extension': [
'error',
{
extensions: ['.js'],
},
],
'react/jsx-indent': [
2,
2,
{
checkAttributes: true,
},
],
'react/jsx-indent-props': [2, 2],
'react/no-access-state-in-setstate': 0,
'react/no-did-update-set-state': 0,
'react/sort-comp': ['off'],
'space-before-function-paren': 0,
'space-before-blocks': 0,
'vars-on-top': ['off'],
},
};
"@babel/core": "7.16.0",
"@babel/eslint-parser": "^7.16.3",
"@babel/plugin-proposal-class-properties": "7.16.0",
"@babel/plugin-proposal-object-rest-spread": "^7.16.0",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-transform-runtime": "7.16.0",
"@babel/preset-env": "7.16.0",
"@babel/preset-react": "7.16.0",
"@svgr/webpack": "^5.5.0",
"autoprefixer": "10.4.0",
"babel-loader": "8.2.3",
"babel-plugin-wildcard": "7.0.0",
"babel-preset-env": "^1.7.0",
"copy-webpack-plugin": "9.1.0",
"css-loader": "6.5.1",
"cssnano": "5.0.10",
"eslint": "8.2.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-arca": "^0.13.3",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.27.0",
"eslint-plugin-react-hooks": "^4.3.0",
"file-loader": "6.2.0",
"html-loader": "^3.0.1",
"html-webpack-inline-svg-plugin": "^2.3.0",
"html-webpack-plugin": "5.5.0",
"mini-css-extract-plugin": "^2.4.4",
"node-sass": "^6.0.1",
"node-sass-tilde-importer": "1.0.2",
"path": "0.12.7",
"postcss": "8.3.11",
"postcss-flexbugs-fixes": "5.0.2",
"postcss-import": "14.0.2",
"postcss-loader": "6.2.0",
"postcss-preset-env": "^6.7.0",
"postcss-scss": "4.0.2",
"postcss-url": "^10.1.3",
"resolve-url-loader": "^4.0.0",
"run-sequence": "2.2.1",
"sass-loader": "12.3.0",
"source-map-loader": "3.0.0",
"style-loader": "3.3.1",
"terser-webpack-plugin": "^5.2.5",
"url-loader": "4.1.1",
"webpack": "^5.64.0",
"webpack-cli": "^4.9.1",
"webpack-dev-server": "^4.4.0",
"webpack-merge": "^5.8.0",
"webpack-remove-empty-scripts": "^0.7.1",
"webpack-stream": "7.0.0",
"yargs": "17.2.1"