- Linting... Prettier...
This commit is contained in:
77
.eslintrc.js
77
.eslintrc.js
@@ -1,4 +1,81 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: '@react-native-community',
|
||||
env: {
|
||||
mocha: true,
|
||||
browser: true,
|
||||
},
|
||||
// parser: 'babel-eslint',
|
||||
// plugins: ['babel', 'immutablejs'],
|
||||
plugins: ['immutablejs'],
|
||||
rules: {
|
||||
'comma-dangle': 'off',
|
||||
'func-call-spacing': 'off',
|
||||
'import/prefer-default-export': 'off',
|
||||
'max-len': ['error', 150, { ignoreComments: true, ignoreTemplateLiterals: true }],
|
||||
'no-confusing-arrow': 'off',
|
||||
'no-mixed-operators': 'off',
|
||||
'no-restricted-properties': [
|
||||
2,
|
||||
{
|
||||
object: 'describe',
|
||||
property: 'only',
|
||||
message:
|
||||
'Please remove any instance of .only from unit tests. If .only is required outside of a unit test, feel free to add an eslint override to ignore this instance of this error.',
|
||||
},
|
||||
{
|
||||
object: 'it',
|
||||
property: 'only',
|
||||
message:
|
||||
'Please remove any instance of .only from unit tests. If .only is required outside of a unit test, feel free to add an eslint override to ignore this instance of this error.',
|
||||
},
|
||||
{
|
||||
object: 'context',
|
||||
property: 'only',
|
||||
message:
|
||||
'Please remove any instance of .only from unit tests. If .only is required outside of a unit test, feel free to add an eslint override to ignore this instance of this error.',
|
||||
},
|
||||
{
|
||||
object: 'tape',
|
||||
property: 'only',
|
||||
message:
|
||||
'Please remove any instance of .only from unit tests. If .only is required outside of a unit test, feel free to add an eslint override to ignore this instance of this error.',
|
||||
},
|
||||
{
|
||||
object: 'test',
|
||||
property: 'only',
|
||||
message:
|
||||
'Please remove any instance of .only from unit tests. If .only is required outside of a unit test, feel free to add an eslint override to ignore this instance of this error.',
|
||||
},
|
||||
{
|
||||
object: 'fixture',
|
||||
property: 'only',
|
||||
message:
|
||||
'Please remove any instance of .only from unit tests. If .only is required outside of a unit test, feel free to add an eslint override to ignore this instance of this error.',
|
||||
},
|
||||
],
|
||||
'no-spaced-func': 'off',
|
||||
'react/jsx-closing-bracket-location': 'off',
|
||||
'react/jsx-first-prop-new-line': 'off',
|
||||
'react/jsx-no-literals': ['error', { noStrings: true }],
|
||||
'react/jsx-no-target-blank': 'off',
|
||||
'react/no-danger': 'off',
|
||||
'space-before-function-paren': 'off',
|
||||
indent: 'off',
|
||||
'indent-legacy': 'off',
|
||||
'immutablejs/no-native-map-set': 'error',
|
||||
'no-invalid-this': 'off',
|
||||
// 'babel/no-invalid-this': 'error',
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['lib/fixtures/**/*.js', '**/testHelper.js'],
|
||||
rules: {
|
||||
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
|
||||
},
|
||||
globals: {
|
||||
expect: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user