diff --git a/.eslintignore b/.eslintignore index f170734..38ee6bb 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ **/node_modules www/.cache/ www/public/ +lib diff --git a/.eslintrc.yml b/.eslintrc.yml index 1062ba5..92c373c 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -8,3 +8,11 @@ env: browser: true plugins: - jsx-a11y + +overrides: + - files: www/**/* + env: + es6: true + - files: stories/**/* + rules: + no-console: off diff --git a/rollup.config.js b/rollup.config.js index 09f2650..0d7e23c 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,15 +1,15 @@ -import nodeResolve from "rollup-plugin-node-resolve"; -import babel from "rollup-plugin-babel"; -import commonjs from "rollup-plugin-commonjs"; -import replace from "rollup-plugin-replace"; -import { sizeSnapshot } from "rollup-plugin-size-snapshot"; -import { terser } from "rollup-plugin-terser"; +import nodeResolve from 'rollup-plugin-node-resolve'; +import babel from 'rollup-plugin-babel'; +import commonjs from 'rollup-plugin-commonjs'; +import replace from 'rollup-plugin-replace'; +import { sizeSnapshot } from 'rollup-plugin-size-snapshot'; +import { terser } from 'rollup-plugin-terser'; -const input = "./src/umd.js"; -const name = "ReactTransitionGroup"; +const input = './src/umd.js'; +const name = 'ReactTransitionGroup'; const globals = { - react: "React", - "react-dom": "ReactDOM" + react: 'React', + 'react-dom': 'ReactDOM' }; const babelOptions = { @@ -20,7 +20,7 @@ const babelOptions = { const commonjsOptions = { include: /node_modules/, namedExports: { - "prop-types": ["object", "oneOfType", "element", "bool", "func"] + 'prop-types': ['object', 'oneOfType', 'element', 'bool', 'func'] } }; @@ -28,8 +28,8 @@ export default [ { input, output: { - file: "./lib/dist/react-transition-group.js", - format: "umd", + file: './lib/dist/react-transition-group.js', + format: 'umd', name, globals }, @@ -38,7 +38,7 @@ export default [ nodeResolve(), babel(babelOptions), commonjs(commonjsOptions), - replace({ "process.env.NODE_ENV": JSON.stringify("development") }), + replace({ 'process.env.NODE_ENV': JSON.stringify('development') }), sizeSnapshot() ] }, @@ -46,8 +46,8 @@ export default [ { input, output: { - file: "./lib/dist/react-transition-group.min.js", - format: "umd", + file: './lib/dist/react-transition-group.min.js', + format: 'umd', name, globals }, @@ -56,7 +56,7 @@ export default [ nodeResolve(), babel(babelOptions), commonjs(commonjsOptions), - replace({ "process.env.NODE_ENV": JSON.stringify("production") }), + replace({ 'process.env.NODE_ENV': JSON.stringify('production') }), sizeSnapshot(), terser() ]