Skip to content

Commit

Permalink
lint root folder
Browse files Browse the repository at this point in the history
  • Loading branch information
prevwong committed Jan 2, 2020
1 parent f910318 commit 15dd5eb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 26 deletions.
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@
packages/docs
packages/examples/landing
site/
jest/
scripts/
4 changes: 1 addition & 3 deletions jest/setup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

beforeEach(() => {
console.error = jest.fn()
console.error = jest.fn();
});

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"clean": "lerna run clean --stream",
"build": "lerna run build --stream",
"deploy": "./scripts/deploy.sh",
"release": "run-s clean build release:npm ",
"release": "run-s clean test lint build release:npm",
"release:npm": "lerna publish",
"test:watch": "jest --watch",
"test": "jest",
"lint": "eslint packages --ext .js,.jsx,.ts,.tsx"
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"devDependencies": {
"@babel/cli": "^7.7.4",
Expand Down
38 changes: 19 additions & 19 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import path from 'path'
import resolve from 'rollup-plugin-node-resolve'
import { terser } from 'rollup-plugin-terser'
import typescript from 'rollup-plugin-typescript'
import babel from 'rollup-plugin-babel'
import path from "path";
import resolve from "rollup-plugin-node-resolve";
import { terser } from "rollup-plugin-terser";
import typescript from "rollup-plugin-typescript";
import babel from "rollup-plugin-babel";

const shouldMinify = process.env.NODE_ENV == 'production';
const bundle = ['@craftjs/utils', 'tslib'];
const shouldMinify = process.env.NODE_ENV === "production";
const bundle = ["@craftjs/utils", "tslib"];

export default {
input: "./src/index.ts",
Expand All @@ -14,17 +14,17 @@ export default {
dir: "dist/esm",
format: "esm",
globals: {
'react': 'React',
'react-dom': 'ReactDOM'
},
react: "React",
"react-dom": "ReactDOM"
}
},
{
dir: "dist/cjs",
format: "cjs"
}
],
external: id => {
return !id.startsWith('.') && !path.isAbsolute(id) && !bundle.includes(id);
return !id.startsWith(".") && !path.isAbsolute(id) && !bundle.includes(id);
},
plugins: [
resolve(),
Expand All @@ -33,18 +33,18 @@ export default {
presets: [
["@babel/preset-typescript"],
[
'@babel/preset-env',
"@babel/preset-env",
{
modules: false,
targets: {
browsers: ['>0.25%, not dead']
browsers: [">0.25%, not dead"]
}
}
]
],
plugins: [
'@babel/proposal-class-properties',
'@babel/proposal-object-rest-spread'
"@babel/proposal-class-properties",
"@babel/proposal-object-rest-spread"
]
}),
shouldMinify &&
Expand All @@ -54,10 +54,10 @@ export default {
compress: {
keep_infinity: true,
pure_getters: true,
passes: 10,
passes: 10
},
ecma: 5,
warnings: true,
}),
warnings: true
})
]
}
};

0 comments on commit 15dd5eb

Please sign in to comment.