UNPKG

config-oclock

Version:

Config O'clock (eslint, babel, prettier, ...) which have same packages in front and back side

106 lines (81 loc) 1.91 kB
# Config O'clock :muscle: This config contains several common utility, like : * Babel * ESLint * Mocha * Chai * Husky * Prettier * Lint-staged ## ESLint * We define all eslint rules in this project. * In **your project**, just add this config in `.eslintrc` : ```json { "extends": "./node_modules/config-oclock/eslint.js", "settings": { "import/resolver": { "node": { "paths": ["./app"] } } } } ``` * If you're using this config with a **React** project, add this in your `.babelrc` ```json { "presets": ["env", "react"], "plugins": [ "transform-class-properties", "transform-object-rest-spread", ["module-resolver", { "root": ["./app"] }] ], "env": { "production": { "plugins": ["transform-react-remove-prop-types"] } } } ``` * Or, with a **Node.js** project, ```json { "presets": ["env"], "plugins": [ "transform-class-properties", "transform-object-rest-spread", ["module-resolver", { "root": ["./"] }] ] } ``` ## Others config You can also use this config with others If you're using **React** : [config-oclock-front](https://www.npmjs.com/package/config-oclock-front), that will install these packages : **Brunch** + Auto Reload Brunch + Brunch + Clean CSS Brunch + Stylus Brunch + Uglify JS Brunch **Babel** + Babel-brunch + Babel-plugin-glamorous-displayname + Babel-plugin-transform-react-remove-prop-types + Babel-preset-react **Tests** + Enzyme, + Adapter for React 16 + Enzyme Redux + JSDom + Node Localstorage + React test renderer + Redux test utils + Sinon Or, if you're using **Node.js** : [config-oclock-back](https://www.npmjs.com/package/config-oclock-back), that will install these packages : * `Babel-cli` * `Nodemon` * `Supertest`