Last active
February 3, 2020 21:37
-
-
Save danileao/ffcefc2809172290ce72fa2b60ffa0b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { addBabelPlugin, override } = require('customize-cra'); | |
module.exports = override( | |
addBabelPlugin([ | |
'babel-plugin-root-import', | |
{ | |
rootPathSuffix: 'src', | |
}, | |
]) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
env: { | |
es6: true, | |
jest: true, | |
browser: true, | |
}, | |
extends: ['airbnb', 'prettier', 'prettier/react'], | |
globals: { | |
Atomics: 'readonly', | |
SharedArrayBuffer: 'readonly', | |
__DEV__: true, | |
}, | |
parserOptions: { | |
ecmaFeatures: { | |
jsx: true, | |
}, | |
ecmaVersion: 2018, | |
sourceType: 'module', | |
}, | |
plugins: ['react', 'jsx-a11y', 'import', 'react-hooks', 'prettier'], | |
rules: { | |
'prettier/prettier': 'error', | |
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.jsx'] }], | |
'import/prefer-default-export': 'off', | |
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }], | |
'react/jsx-one-expression-per-line': 'off', | |
'global-require': 'off', | |
'react-native/no-raw-text': 'off', | |
'no-param-reassign': 'off', | |
'no-underscore-dangle': 'off', | |
camelcase: 'off', | |
'no-console': ['error', { allow: ['tron'] }], | |
'react-hooks/rules-of-hooks': 'error', | |
'react-hooks/exhaustive-deps': 'warn', | |
'react/jsx-props-no-spreading': 'off', | |
'jsx-a11y/label-has-associated-control': 'off', | |
'jsx-a11y/anchor-is-valid': 'off', | |
'no-return-assign': 'off', | |
}, | |
settings: { | |
'import/resolver': { | |
'babel-plugin-root-import': { | |
rootPathSuffix: 'src', | |
}, | |
}, | |
}, | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"start": "react-app-rewired start", | |
"build": "react-app-rewired build", | |
"test": "react-app-rewired test", | |
"eject": "react-scripts eject" | |
}, | |
"devDependencies": { | |
"babel-eslint": "^10.0.3", | |
"babel-plugin-root-import": "^6.4.1", | |
"eslint": "^6.5.1", | |
"eslint-config-airbnb": "^18.0.1", | |
"eslint-config-prettier": "^6.4.0", | |
"eslint-import-resolver-babel-plugin-root-import": "^1.1.1", | |
"eslint-plugin-import": "^2.18.2", | |
"eslint-plugin-jsx-a11y": "^6.2.3", | |
"eslint-plugin-prettier": "^3.1.1", | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment