Skip to content

Commit

Permalink
breaking: Remove recommended setup configs (#6)
Browse files Browse the repository at this point in the history
* breaking: Remove internal suggested configs in favor of externalizing them

* chore: Update internal prettier and eslint configs

* chore: Clean up files according to new lint rules
  • Loading branch information
reintroducing authored Jul 25, 2020
1 parent dfa53ca commit 961afa1
Show file tree
Hide file tree
Showing 15 changed files with 494 additions and 1,713 deletions.
13 changes: 0 additions & 13 deletions .eslintrc

This file was deleted.

21 changes: 0 additions & 21 deletions .prettierrc

This file was deleted.

11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,22 @@ Follow the steps below to install and initialize rSR in a new project.
```bash
npx rsr
```
1. Check the `Suggested Setup Configs` section below for additional setup steps not related to rSR.
1. Begin development.
```bash
npm start
```

## Suggested Setup Configs
As of version `1.0.0` of rSR, different types of configurations has been offloaded from the tool internally and it is suggested to be maintained by each project manually. This allows for greater flexibility in the management of these configurations and it is a better practice for the tool to not dictate this.

* [Browserslist](https://github.com/spothero/browserslist-config)
* [Prettier](https://github.com/spothero/prettier-config)
* [Babel](https://github.com/spothero/babel-preset)
* [ESLint](https://github.com/spothero/eslint-config)
* [Stylelint](https://github.com/spothero/stylelint-config)


## Available Configuration
You can override a handful of configuration options by creating a `rsr.config.js` file at the root of your project. Most options are direct pass throughs of their webpack counterparts as shown below. The module should export a function that returns an object. The following parameters are passed into the function:

Expand Down
1 change: 1 addition & 0 deletions bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env node
/* eslint-disable no-console */
const arg = require('arg');
const chalk = require('chalk');
const spawn = require('cross-spawn');
Expand Down
1,994 changes: 458 additions & 1,536 deletions package-lock.json

Large diffs are not rendered by default.

58 changes: 18 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,51 +15,33 @@
"scripts": {
"release": "npm-release -- public"
},
"keywords": [],
"author": "Matt Przybylski",
"license": "ISC",
"license": "MIT",
"eslintConfig": {
"extends": [
"@spothero",
"plugin:prettier/recommended",
"prettier/babel",
"prettier/react"
]
},
"prettier": "@spothero/prettier-config",
"devDependencies": {
"@spothero/commitlint-config": "2.1.2",
"@spothero/eslint-config": "1.9.1",
"@spothero/npm-publisher": "2.3.2",
"react": "16.13.1"
"@spothero/prettier-config": "0.1.1"
},
"dependencies": {
"@babel/core": "7.5.5",
"@babel/plugin-proposal-class-properties": "7.5.5",
"@babel/plugin-proposal-decorators": "7.4.4",
"@babel/plugin-proposal-do-expressions": "7.5.0",
"@babel/plugin-proposal-export-default-from": "7.5.2",
"@babel/plugin-proposal-export-namespace-from": "7.5.2",
"@babel/plugin-proposal-function-sent": "7.5.0",
"@babel/plugin-proposal-json-strings": "7.2.0",
"@babel/plugin-proposal-logical-assignment-operators": "7.2.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.4.4",
"@babel/plugin-proposal-numeric-separator": "7.2.0",
"@babel/plugin-proposal-object-rest-spread": "7.5.5",
"@babel/plugin-proposal-optional-chaining": "7.2.0",
"@babel/plugin-proposal-pipeline-operator": "7.5.0",
"@babel/plugin-proposal-throw-expressions": "7.2.0",
"@babel/plugin-syntax-dynamic-import": "7.2.0",
"@babel/plugin-syntax-import-meta": "7.2.0",
"@babel/plugin-transform-runtime": "7.5.5",
"@babel/preset-env": "7.5.5",
"@babel/preset-react": "7.0.0",
"@babel/runtime-corejs3": "7.5.5",
"@hot-loader/react-dom": "16.13.0",
"@spothero/eslint-config": "1.9.1",
"@spothero/stylelint-config": "1.4.0",
"arg": "4.1.3",
"babel-loader": "8.1.0",
"babel-plugin-transform-react-jsx-img-import": "0.1.4",
"chalk": "4.1.0",
"cosmiconfig": "6.0.0",
"cross-spawn": "7.0.3",
"css-loader": "4.0.0",
"eslint": "6.2.2",
"eslint-config-prettier": "6.1.0",
"eslint-friendly-formatter": "4.0.1",
"eslint-loader": "3.0.0",
"eslint-plugin-prettier": "3.1.0",
"eslint-loader": "4.0.2",
"file-loader": "6.0.0",
"html-webpack-plugin": "4.3.0",
"image-webpack-loader": "6.0.0",
Expand All @@ -72,14 +54,10 @@
"postcss-import": "12.0.1",
"postcss-loader": "3.0.0",
"postcss-preset-env": "6.7.0",
"prettier": "1.18.2",
"react-hot-loader": "4.12.21",
"sass": "1.26.10",
"sass-loader": "9.0.2",
"sass-resources-loader": "2.0.3",
"stylelint": "10.1.0",
"stylelint-config-prettier": "5.2.0",
"stylelint-prettier": "1.1.1",
"stylelint-webpack-plugin": "0.10.5",
"terser-webpack-plugin": "3.0.7",
"webpack": "4.44.0",
Expand All @@ -89,10 +67,10 @@
"webpack-dev-server": "3.11.0"
},
"peerDependencies": {
"core-js": "3.6.5",
"prop-types": "15.7.2",
"react": "16.13.1",
"react-dom": "16.13.1",
"regenerator-runtime": "0.13.7"
"core-js": "^3.6.5",
"prop-types": "^15.7.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"regenerator-runtime": "^0.13.7"
}
}
1 change: 1 addition & 0 deletions scripts/build.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
process.env.BABEL_ENV = 'production';
process.env.NODE_ENV = 'production';

Expand Down
1 change: 1 addition & 0 deletions scripts/contrib.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
const chalk = require('chalk');
const inquirer = require('inquirer');
const {install} = require('pkg-install');
Expand Down
10 changes: 3 additions & 7 deletions scripts/init.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
const path = require('path');
const chalk = require('chalk');
const inquirer = require('inquirer');
Expand All @@ -19,16 +20,11 @@ inquirer
type: 'checkbox',
name: 'configs',
choices: [
{name: '.babelrc', checked: true},
{name: '.browserslistrc', checked: true},
{name: '.editorconfig', checked: false},
{name: '.eslintrc', checked: true},
{name: '.editorconfig', checked: true},
{name: '.gitignore', checked: true},
{name: '.npmrc', checked: false},
{name: '.npmrc', checked: true},
{name: '.nvmrc', checked: false},
{name: '.prettierignore', checked: true},
{name: '.prettierrc', checked: true},
{name: '.stylelintrc', checked: true},
],
},
{
Expand Down
1 change: 1 addition & 0 deletions scripts/start.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
process.env.BABEL_ENV = 'development';
process.env.NODE_ENV = 'development';

Expand Down
48 changes: 0 additions & 48 deletions templates/dotfiles/.babelrc

This file was deleted.

12 changes: 0 additions & 12 deletions templates/dotfiles/.browserslistrc

This file was deleted.

12 changes: 0 additions & 12 deletions templates/dotfiles/.eslintrc

This file was deleted.

21 changes: 0 additions & 21 deletions templates/dotfiles/.prettierrc

This file was deleted.

3 changes: 0 additions & 3 deletions templates/dotfiles/.stylelintrc

This file was deleted.

0 comments on commit 961afa1

Please sign in to comment.