Skip to content

Commit

Permalink
v0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aMarCruz committed Nov 21, 2019
1 parent 6a13d54 commit 606319e
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 38 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changes for eslint-config-standardize

## \[0.5.0] - 2019-11-21

### Added

- [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks)
- [preact](https://www.npmjs.com/package/preact) config.

### Changed

- '@typescript-eslint/member-delimiter-style' singleline delimiter to 'comma'
- Update Prettierx to v0.10.0, based on Prettier 1.9.1
- Update fake Prettier package to report version 1.9.1
- Minimum ESLint 6.2.2
- Internal: rename lib/get-conf.js to lib/merged-conf.js

## \[0.4.2] - 2019-11-01

### Changed
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![License][license-badge]][license-url]
[![npm Version][npm-badge]][npm-url]

For use with ESLint v6.0.1, for ESLint v5.x use eslint-config-standardize 0.3.x
For use with ESLint v6.2.2 and above, for ESLint v5.x use eslint-config-standardize 0.3.x

Minimum NodeJS version supported: NodeJS 8 - deprecated; NodeJS 10 is recommended as described in [brodybits/prettierx#6](https://github.com/brodybits/prettierx/issues/6)

Expand Down Expand Up @@ -73,6 +73,7 @@ You can mix the "standardize/preact" with "standardize/typescript" configs.
- [node](https://www.npmjs.com/package/eslint-plugin-node)
- [promise](https://www.npmjs.com/package/eslint-plugin-promise)
- [react](https://www.npmjs.com/package/eslint-plugin-react)
- [react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks)
- [standard](https://www.npmjs.com/package/eslint-plugin-standard)
- [unicorn](https://www.npmjs.com/package/eslint-plugin-unicorn)

Expand Down
2 changes: 1 addition & 1 deletion lib/configure-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = function configureJsx (conf, version) {
resolver.node = resolver.node || {}
resolver.node.extensions = arrayAddUnique(resolver.node.extensions, extensions)

conf.plugins = arrayAddUnique(conf.plugins, ['react'])
conf.plugins = arrayAddUnique(conf.plugins, ['react', 'react-hooks'])
conf.globals = Object.assign(conf.globals || {}, globals)
Object.assign(conf.rules, rules)

Expand Down
2 changes: 2 additions & 0 deletions lib/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ module.exports = {
'react/self-closing-comp': ERROR,
'react/style-prop-object': ERROR,
'react/void-dom-elements-no-children': ERROR,
'react-hooks/rules-of-hooks': ERROR,
'react-hooks/exhaustive-deps': WARN,
}
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-standardize",
"version": "0.4.2",
"version": "0.5.0",
"main": "./index.js",
"author": "aMarCruz <[email protected]>",
"description": "My personal configuration based on StandardJS, ready for JavaScript and TypeScript",
Expand Down Expand Up @@ -48,24 +48,25 @@
"eslint-plugin-node": "~10.0.0",
"eslint-plugin-promise": "~4.2.1",
"eslint-plugin-react": "~7.16.0",
"eslint-plugin-react-hooks": "~2.3.0",
"eslint-plugin-standard": "~4.0.1",
"eslint-plugin-unicorn": "~12.1.0"
"eslint-plugin-unicorn": "~13.0.0"
},
"devDependencies": {
"@types/node": "~12.12.3",
"@types/node": "~12.12.11",
"@types/react": "~16.9.11",
"@typescript-eslint/parser": "^2.6.0",
"@typescript-eslint/eslint-plugin": "^2.6.0",
"eslint": "6.0.1",
"@typescript-eslint/parser": "~2.8.0",
"@typescript-eslint/eslint-plugin": "~2.8.0",
"eslint": "6.2.2",
"prettier": "file:./prettier",
"prettierx": "^0.8.0",
"react": "^16.8.2",
"typescript": "~3.6.4"
"prettierx": "~0.10.0",
"react": "~16.8.3",
"typescript": "~3.7.2"
},
"optionalDependencies": {
"@typescript-eslint/eslint-plugin": "^2.6.0"
"@typescript-eslint/eslint-plugin": "~2.8.0"
},
"peerDependencies": {
"eslint": ">=6.0.1"
"eslint": ">=6.2.2"
}
}
2 changes: 1 addition & 1 deletion preact/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const ON = 2
module.exports = {
settings: {
react: {
version: '16.10',
version: '16.12',
pragma: 'h',
},
},
Expand Down
22 changes: 4 additions & 18 deletions prettier/LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
MIT License
Copyright © Christopher J. Brody, James Long, and other contributors

Copyright (c) 2019 Alberto Martínez
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3 changes: 2 additions & 1 deletion prettier/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
// @ts-nocheck
module.exports = require('prettierx')
const version = require('./package.json').version
module.exports = Object.assign(require('prettierx'), { version })
8 changes: 6 additions & 2 deletions prettier/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
{
"name": "prettier",
"version": "1.18.0",
"version": "1.19.1",
"description": "Prettier(x) is an opinionated code formatter",
"main": "./index.js",
"author": "James Long",
"bin": {
"prettier": "../prettierx/bin-prettierx.js"
},
"engines": {
"node": ">=8"
},
"peerDependencies": {
"prettierx": "^0.8.0"
"prettierx": "~0.10.0"
},
"homepage": "https://github.com/brodybits/prettierx",
"license": "MIT"
}
14 changes: 11 additions & 3 deletions typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const standardConf = require('eslint-config-standard')

const OFF = 0
const ON = 2
// const WARN = 1

const allExtensions = ['.js', '.jsx', '.mjs', '.android.js', '.ios.js', '.web.js', '.ts', '.tsx', '.d.ts']

Expand Down Expand Up @@ -42,7 +43,10 @@ module.exports = {
{ assertionStyle: 'as', objectLiteralTypeAssertions: 'allow-as-parameter' },
],
'@typescript-eslint/indent': standardConf.rules.indent,
'@typescript-eslint/member-delimiter-style': [ON, { multiline: { delimiter: 'none' } }],
'@typescript-eslint/member-delimiter-style': [
ON,
{ multiline: { delimiter: 'none' }, singleline: { delimiter: 'comma' } },
],
'@typescript-eslint/member-naming': [ON, { private: '^_' }],
'@typescript-eslint/no-for-in-array': ON,
'@typescript-eslint/no-inferrable-types': ON,
Expand All @@ -54,8 +58,10 @@ module.exports = {

overrides: [
{
files: ['*.ts', '*.tsx'],
files: ['**/*.ts', '**/*.tsx'],
rules: {
'brace-style': OFF,
'func-call-spacing': OFF,
'no-redeclare': OFF, // avoid conflicts when exporting function+namespace
'import/named': OFF,
'import/export': OFF,
Expand All @@ -65,8 +71,10 @@ module.exports = {
'no-undef': OFF, // handled by TS
'no-unused-vars': OFF, // handled by TS `noUnusedLocals`
'no-use-before-define': OFF,
'@typescript-eslint/no-use-before-define': OFF, // [ON, { functions: false, typedefs: false }],
'@typescript-eslint/brace-style': standardConf.rules['brace-style'],
'@typescript-eslint/func-call-spacing': standardConf.rules['func-call-spacing'],
'@typescript-eslint/no-array-constructor': ON,
'@typescript-eslint/no-use-before-define': OFF, // [ON, { functions: false, typedefs: false }],
'@typescript-eslint/no-var-requires': ON,
},
},
Expand Down

0 comments on commit 606319e

Please sign in to comment.