Skip to content

Commit

Permalink
chore: security updates to dev dependencies & cleanup (#289)
Browse files Browse the repository at this point in the history
- 🔧 Upgrade babel and presets (env & react).
- 🔧 Upgrade ESLint & Prettier.
- 🔥 Remove unused dependencies/configs/scripts.
  • Loading branch information
apollonian authored May 29, 2021
1 parent 5f496ba commit 8d67c0b
Show file tree
Hide file tree
Showing 19 changed files with 6,874 additions and 26,664 deletions.
6 changes: 0 additions & 6 deletions .babelrc

This file was deleted.

5 changes: 5 additions & 0 deletions .babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"],
"comments": false,
"compact": true
}
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Dependencies
node_modules/

# Config
webpack.config.js
27 changes: 24 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
{
"extends": ["airbnb", "prettier"],
"plugins": ["prettier", "flowtype"],
"env": {
"browser": true
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"settings": {
"react": {
"version": "detect"
}
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:import/recommended",
"plugin:prettier/recommended"
],
"rules": {
"prettier/prettier": "error"
"no-unused-vars": "off",
"react/prop-types": "off"
}
}
11 changes: 0 additions & 11 deletions .flowconfig

This file was deleted.

14 changes: 10 additions & 4 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
docs
src
.babelrc
webpack.config.js
/.github
/demo
/src
.all-contributorsrc
.babelrc.json
.eslintignore
.eslintrc.json
.prettierignore
.prettierrc.json
webpack.config.js
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Build
/lib

# Demo Build
/demo

# Dependencies
/node_modules
4 changes: 0 additions & 4 deletions .prettierrc

This file was deleted.

8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"arrowParens": "always",
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
}
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import OtpInput from 'react-otp-input';
export default class App extends Component {
state = { otp: '' };

handleChange = otp => this.setState({ otp });
handleChange = (otp) => this.setState({ otp });

render() {
return (
Expand Down Expand Up @@ -78,12 +78,12 @@ export default class App extends Component {
<td>''</td>
<td>The value of the OTP passed into the component.</td>
</tr>
<tr>
<td>placeholder</td>
<td>string</td>
<td>false</td>
<td>none</td>
<td>Specify an expected value of each input. The length of this string should be equal to <code>numInputs</code>.</td>
<tr>
<td>placeholder</td>
<td>string</td>
<td>false</td>
<td>none</td>
<td>Specify an expected value of each input. The length of this string should be equal to <code>numInputs</code>.</td>
</tr>
<tr>
<td>separator</td>
Expand Down Expand Up @@ -218,6 +218,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
6 changes: 0 additions & 6 deletions docs/index.mdx

This file was deleted.

Loading

0 comments on commit 8d67c0b

Please sign in to comment.