Basic question about ESlint - Where install it? #73
Answered
by
albertcito
albertcito
asked this question in
Q&A
-
I'm using solito.dev blank project. I would like to install Airbnb style guide. What folder do I have to install it?
What option do you recommend about
May I create an extra Thank you for your help. |
Beta Was this translation helpful? Give feedback.
Answered by
albertcito
May 29, 2022
Replies: 1 comment
-
I installed it in main directory:
This is my module.exports = {
env: {
es2021: true,
node: true,
'react-native/react-native': true,
},
extends: [
'next',
'plugin:react/recommended',
'airbnb',
'airbnb/hooks',
],
settings: {
next: {
rootDir: 'apps/next/',
},
},
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: [
'react',
'react-native',
'@typescript-eslint',
],
rules: {
'import/no-extraneous-dependencies': ['off'],
'react/react-in-jsx-scope': ['off'],
'react/jsx-filename-extension': [1, { extensions: ['.ts', '.tsx'] }],
'import/extensions': ['off'],
'react/function-component-definition': [1, {
namedComponents: ['function-declaration', 'function-expression', 'arrow-function'],
unnamedComponents: ['function-expression', 'arrow-function'],
}],
},
}; |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
albertcito
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I installed it in main directory:
yarn add -D -W eslint
npx eslint --init
yarn add -D -W eslint-plugin-react-native
This is my
.eslintrc.js
file for now.