Skip to content

Commit

Permalink
Added ESLint and deployed on Travis, fixed revert #52
Browse files Browse the repository at this point in the history
  • Loading branch information
JimLau49 committed Mar 21, 2020
1 parent 03c7e14 commit a939946
Show file tree
Hide file tree
Showing 16 changed files with 1,176 additions and 102 deletions.
37 changes: 37 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,37 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
extends: [
"airbnb-typescript",
"prettier",
"prettier/@typescript-eslint",
"prettier/react",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:react/recommended"
],
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname
},
rules: {
"@typescript-eslint/no-use-before-define": [
"error",
{
functions: false,
classes: false,
variables: false,
typedefs: false
}
],
"import/prefer-default-export": "off",
"no-shadow": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["off"],
"global-require": "off",
"react/jsx-props-no-spreading": ["off"],
"react/no-array-index-key": "off",
"no-underscore-dangle": "off",
"no-return-assign": "off"
}
};
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -13,4 +13,6 @@ script:
- pre-commit run -a
- npm install -g expo-cli --loglevel=error
- npm install --log-level=error
- echo "fakeSecret" >> secrets.js
- npm run lint
- npm test
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -38,3 +38,11 @@ To run this react-native application and start development:
- `npm start`

There you go! You can now connect your phone and start developing and debugging your application!

## Linting

### ESLint

* `npm run lint`: To start the linter to look for code smells
* `npm run lint-fix`: To allow the linter to fix some of the code smells however some may need to be fixed manually

0 comments on commit a939946

Please sign in to comment.