Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix top-level export #316

Merged
merged 4 commits into from
Mar 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
!.babelrc.js
!.eslintrc.js

**/coverage/
**/lib/
**/node_modules/
10 changes: 0 additions & 10 deletions .eslintrc

This file was deleted.

10 changes: 10 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
extends: ['4catalyzer', 'prettier'],
plugins: ['prettier'],
env: {
browser: true,
},
rules: {
'prettier/prettier': 'error',
},
};
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@
"files": [
"lib"
],
"main": "lib/index.js",
"main": "lib/cjs/index.js",
"module": "lib/esm/index.js",
"scripts": {
"build": "rimraf lib && yarn build:cjs && yarn build:esm && yarn build:pick",
"build:cjs": "babel src -d lib/cjs",
"build:esm": "babel src -d lib/esm --env-name esm",
"build:pick": "cherry-pick ../src --cjs-dir=cjs --esm-dir=esm --cwd=lib",
"lint": "eslint examples/*/src src test *.js",
"build": "rimraf lib && npm run build:cjs && npm run build:esm && npm run build:pick",
"build:cjs": "babel -d lib/cjs src",
"build:esm": "babel --env-name esm -d lib/esm src",
"build:pick": "cherry-pick --cjs-dir cjs --esm-dir esm --cwd lib ../src",
"format": "eslint --fix . && npm run prettier -- --write",
"lint": "eslint . && npm run prettier -- -l",
"prepublish": "npm run build",
"prettier": "prettier --ignore-path .eslintignore '**/*.md'",
"release": "rollout",
"tdd": "cross-env NODE_ENV=test karma start",
"test": "npm run lint && npm run testonly",
Expand Down
14 changes: 0 additions & 14 deletions test/.eslintrc

This file was deleted.

17 changes: 17 additions & 0 deletions test/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
env: {
mocha: true,
},
globals: {
expect: false,
sinon: false,
},
rules: {
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
},
],
},
};