Skip to content

Commit

Permalink
[lint] Add a "lint" script to all packages and fix lint warnings & er…
Browse files Browse the repository at this point in the history
…rors

This turns on linting for all of the packages, enforced by `expotools check-packages`. I added a "lint" script to each package and an `.eslintrc.js` file created by expo-module-scripts. For some packages like jest-expo that are intended to run on Node, I used a small handwritten ESLint config that uses the universe/node config.

Tested with `expotools check-packages` after fixing all the lint warnings and errors.
  • Loading branch information
ide committed Aug 31, 2019
1 parent e4cc199 commit 79a5fc6
Show file tree
Hide file tree
Showing 327 changed files with 1,611 additions and 864 deletions.
2 changes: 2 additions & 0 deletions packages/@unimodules/core/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// @generated by expo-module-scripts
module.exports = require('expo-module-scripts/eslintrc.base.js');
2 changes: 1 addition & 1 deletion packages/@unimodules/core/.npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// @generated by expo-module-scripts
# @generated by expo-module-scripts
babel.config.js
2 changes: 1 addition & 1 deletion packages/@unimodules/core/build/deprecate.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/@unimodules/core/build/deprecate.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/@unimodules/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"build": "expo-module build",
"clean": "expo-module clean",
"lint": "expo-module lint",
"test": "expo-module test",
"prepare": "expo-module prepare",
"prepublishOnly": "expo-module prepublishOnly",
Expand Down
2 changes: 1 addition & 1 deletion packages/@unimodules/core/src/deprecate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ function prependLibrary(library: string, message: string): string {
* expo-ar -> EXPO_AR
*/
function codeFromLibrary(library: string): string {
const code = library.replace(/[-\.]/g, '_').toUpperCase();
const code = library.replace(/[-.]/g, '_').toUpperCase();
return code;
}
2 changes: 2 additions & 0 deletions packages/@unimodules/react-native-adapter/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// @generated by expo-module-scripts
module.exports = require('expo-module-scripts/eslintrc.base.js');
2 changes: 1 addition & 1 deletion packages/@unimodules/react-native-adapter/.npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// @generated by expo-module-scripts
# @generated by expo-module-scripts
babel.config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion packages/@unimodules/react-native-adapter/build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 79a5fc6

Please sign in to comment.