Skip to content

Commit 606319e

Browse files
author
aMarCruz
committed
v0.5.0
1 parent 6a13d54 commit 606319e

File tree

10 files changed

+56
-38
lines changed

10 files changed

+56
-38
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changes for eslint-config-standardize
22

3+
## \[0.5.0] - 2019-11-21
4+
5+
### Added
6+
7+
- [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks)
8+
- [preact](https://www.npmjs.com/package/preact) config.
9+
10+
### Changed
11+
12+
- '@typescript-eslint/member-delimiter-style' singleline delimiter to 'comma'
13+
- Update Prettierx to v0.10.0, based on Prettier 1.9.1
14+
- Update fake Prettier package to report version 1.9.1
15+
- Minimum ESLint 6.2.2
16+
- Internal: rename lib/get-conf.js to lib/merged-conf.js
17+
318
## \[0.4.2] - 2019-11-01
419

520
### Changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![License][license-badge]][license-url]
44
[![npm Version][npm-badge]][npm-url]
55

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

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

@@ -73,6 +73,7 @@ You can mix the "standardize/preact" with "standardize/typescript" configs.
7373
- [node](https://www.npmjs.com/package/eslint-plugin-node)
7474
- [promise](https://www.npmjs.com/package/eslint-plugin-promise)
7575
- [react](https://www.npmjs.com/package/eslint-plugin-react)
76+
- [react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks)
7677
- [standard](https://www.npmjs.com/package/eslint-plugin-standard)
7778
- [unicorn](https://www.npmjs.com/package/eslint-plugin-unicorn)
7879

lib/configure-react.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = function configureJsx (conf, version) {
1616
resolver.node = resolver.node || {}
1717
resolver.node.extensions = arrayAddUnique(resolver.node.extensions, extensions)
1818

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

lib/react.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,6 @@ module.exports = {
3737
'react/self-closing-comp': ERROR,
3838
'react/style-prop-object': ERROR,
3939
'react/void-dom-elements-no-children': ERROR,
40+
'react-hooks/rules-of-hooks': ERROR,
41+
'react-hooks/exhaustive-deps': WARN,
4042
}

package.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-standardize",
3-
"version": "0.4.2",
3+
"version": "0.5.0",
44
"main": "./index.js",
55
"author": "aMarCruz <[email protected]>",
66
"description": "My personal configuration based on StandardJS, ready for JavaScript and TypeScript",
@@ -48,24 +48,25 @@
4848
"eslint-plugin-node": "~10.0.0",
4949
"eslint-plugin-promise": "~4.2.1",
5050
"eslint-plugin-react": "~7.16.0",
51+
"eslint-plugin-react-hooks": "~2.3.0",
5152
"eslint-plugin-standard": "~4.0.1",
52-
"eslint-plugin-unicorn": "~12.1.0"
53+
"eslint-plugin-unicorn": "~13.0.0"
5354
},
5455
"devDependencies": {
55-
"@types/node": "~12.12.3",
56+
"@types/node": "~12.12.11",
5657
"@types/react": "~16.9.11",
57-
"@typescript-eslint/parser": "^2.6.0",
58-
"@typescript-eslint/eslint-plugin": "^2.6.0",
59-
"eslint": "6.0.1",
58+
"@typescript-eslint/parser": "~2.8.0",
59+
"@typescript-eslint/eslint-plugin": "~2.8.0",
60+
"eslint": "6.2.2",
6061
"prettier": "file:./prettier",
61-
"prettierx": "^0.8.0",
62-
"react": "^16.8.2",
63-
"typescript": "~3.6.4"
62+
"prettierx": "~0.10.0",
63+
"react": "~16.8.3",
64+
"typescript": "~3.7.2"
6465
},
6566
"optionalDependencies": {
66-
"@typescript-eslint/eslint-plugin": "^2.6.0"
67+
"@typescript-eslint/eslint-plugin": "~2.8.0"
6768
},
6869
"peerDependencies": {
69-
"eslint": ">=6.0.1"
70+
"eslint": ">=6.2.2"
7071
}
7172
}

preact/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const ON = 2
55
module.exports = {
66
settings: {
77
react: {
8-
version: '16.10',
8+
version: '16.12',
99
pragma: 'h',
1010
},
1111
},

prettier/LICENSE

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
1-
MIT License
1+
Copyright © Christopher J. Brody, James Long, and other contributors
22

3-
Copyright (c) 2019 Alberto Martínez
3+
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:
44

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

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
7+
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.

prettier/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/* eslint-disable */
22
// @ts-nocheck
3-
module.exports = require('prettierx')
3+
const version = require('./package.json').version
4+
module.exports = Object.assign(require('prettierx'), { version })

prettier/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
{
22
"name": "prettier",
3-
"version": "1.18.0",
3+
"version": "1.19.1",
44
"description": "Prettier(x) is an opinionated code formatter",
55
"main": "./index.js",
66
"author": "James Long",
77
"bin": {
88
"prettier": "../prettierx/bin-prettierx.js"
99
},
10+
"engines": {
11+
"node": ">=8"
12+
},
1013
"peerDependencies": {
11-
"prettierx": "^0.8.0"
14+
"prettierx": "~0.10.0"
1215
},
16+
"homepage": "https://github.com/brodybits/prettierx",
1317
"license": "MIT"
1418
}

typescript/index.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const standardConf = require('eslint-config-standard')
33

44
const OFF = 0
55
const ON = 2
6+
// const WARN = 1
67

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

@@ -42,7 +43,10 @@ module.exports = {
4243
{ assertionStyle: 'as', objectLiteralTypeAssertions: 'allow-as-parameter' },
4344
],
4445
'@typescript-eslint/indent': standardConf.rules.indent,
45-
'@typescript-eslint/member-delimiter-style': [ON, { multiline: { delimiter: 'none' } }],
46+
'@typescript-eslint/member-delimiter-style': [
47+
ON,
48+
{ multiline: { delimiter: 'none' }, singleline: { delimiter: 'comma' } },
49+
],
4650
'@typescript-eslint/member-naming': [ON, { private: '^_' }],
4751
'@typescript-eslint/no-for-in-array': ON,
4852
'@typescript-eslint/no-inferrable-types': ON,
@@ -54,8 +58,10 @@ module.exports = {
5458

5559
overrides: [
5660
{
57-
files: ['*.ts', '*.tsx'],
61+
files: ['**/*.ts', '**/*.tsx'],
5862
rules: {
63+
'brace-style': OFF,
64+
'func-call-spacing': OFF,
5965
'no-redeclare': OFF, // avoid conflicts when exporting function+namespace
6066
'import/named': OFF,
6167
'import/export': OFF,
@@ -65,8 +71,10 @@ module.exports = {
6571
'no-undef': OFF, // handled by TS
6672
'no-unused-vars': OFF, // handled by TS `noUnusedLocals`
6773
'no-use-before-define': OFF,
68-
'@typescript-eslint/no-use-before-define': OFF, // [ON, { functions: false, typedefs: false }],
74+
'@typescript-eslint/brace-style': standardConf.rules['brace-style'],
75+
'@typescript-eslint/func-call-spacing': standardConf.rules['func-call-spacing'],
6976
'@typescript-eslint/no-array-constructor': ON,
77+
'@typescript-eslint/no-use-before-define': OFF, // [ON, { functions: false, typedefs: false }],
7078
'@typescript-eslint/no-var-requires': ON,
7179
},
7280
},

0 commit comments

Comments
 (0)