Socket
Socket
Sign inDemoInstall

eslint-config-prettier

Package Overview
Dependencies
89
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.6.0 to 4.0.0

@typescript-eslint.js

22

CHANGELOG.md

@@ -0,1 +1,14 @@

### Version 4.0.0 (2019-01-26)
- Breaking change: Support for [eslint-plugin-typescript] has been removed and
replaced with support for its successor [@typescript-eslint/eslint-plugin].
Thanks to TANIGUCHI Masaya (@ta2gch) and everyone else who helped with this!
- Changed: [arrow-body-style] and [prefer-arrow-callback] are now marked as
[special rules][arrow-special], since they might cause problems if using
[eslint-plugin-prettier] and `--fix`. They are turned off by default, and the
CLI helper tool will _warn_ about them (but not error if you do enable them).
This won’t break your linting checks, but do note that these rules will be
disabled unless you explicitly enable them again, and that you might see new
warnings when running the CLI helper tool.
### Version 3.6.0 (2019-01-19)

@@ -197,2 +210,3 @@

[@typescript-eslint/eslint-plugin]: https://github.com/typescript-eslint/typescript-eslint
[ESLint 4.0.0]: https://eslint.org/blog/2017/06/eslint-v4.0.0-released

@@ -202,4 +216,7 @@ [ESLint 4.6.0]: https://eslint.org/blog/2017/09/eslint-v4.6.0-released

[array-element-newline]: https://eslint.org/docs/rules/array-element-newline
[arrow-body-style]: https://eslint.org/docs/rules/arrow-body-style
[arrow-special]: https://github.com/prettier/eslint-config-prettier/blob/2c842675e55b91aecaef6f997d234ebf2d220ffb/README.md#arrow-body-style-and-prefer-arrow-callback
[curly]: https://eslint.org/docs/rules/curly
[eslint-plugin-flowtype]: https://github.com/gajus/eslint-plugin-flowtype
[eslint-plugin-prettier]: https://github.com/prettier/eslint-plugin-prettier
[eslint-plugin-react]: https://github.com/yannickcr/eslint-plugin-react

@@ -225,5 +242,6 @@ [eslint-plugin-standard]: https://github.com/xjamundx/eslint-plugin-standard

[one-var-declaration-per-line]: https://eslint.org/docs/rules/one-var-declaration-per-line
[prefer-arrow-callback]: https://eslint.org/docs/rules/prefer-arrow-callback
[prettier]: https://github.com/prettier
[quotes-special]: https://github.com/prettier/eslint-config-prettier/blob/8d264cd0a7f06c12e2e05415e0282a4f8f21ebc9/README.md#quotes
[quotes]: https://eslint.org/docs/rules/quotes
[quotes-special]: https://github.com/prettier/eslint-config-prettier/blob/8d264cd0a7f06c12e2e05415e0282a4f8f21ebc9/README.md#quotes
[react/jsx-child-element-spacing]: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-child-element-spacing.md

@@ -236,3 +254,3 @@ [react/jsx-closing-tag-location]: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md

[template-tag-spacing]: https://eslint.org/docs/rules/template-tag-spacing
[vue/html-self-closing-special]: https://github.com/prettier/eslint-config-prettier/blob/d5e7af986221df5faedc12893d8dc3150a808693/README.md#vuehtml-self-closing
[vue/html-self-closing]: https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/html-self-closing.md
[vue/html-self-closing-special]: https://github.com/prettier/eslint-config-prettier/blob/d5e7af986221df5faedc12893d8dc3150a808693/README.md#vuehtml-self-closing

@@ -8,2 +8,3 @@ "use strict";

// script can distinguish them.)
"arrow-body-style": 0,
curly: 0,

@@ -16,2 +17,3 @@ "lines-around-comment": 0,

"no-unexpected-multiline": 0,
"prefer-arrow-callback": 0,
quotes: 0,

@@ -18,0 +20,0 @@ // The rest are rules that you never need to enable when using Prettier.

15

package.json
{
"name": "eslint-config-prettier",
"version": "3.6.0",
"version": "4.0.0",
"license": "MIT",

@@ -10,2 +10,3 @@ "author": "Simon Lydell",

"bin/",
"@typescript-eslint.js",
"babel.js",

@@ -16,3 +17,2 @@ "flowtype.js",

"standard.js",
"typescript.js",
"unicorn.js",

@@ -30,3 +30,3 @@ "vue.js"

"scripts": {
"doctoc": "doctoc README.md && replace \"\\[(\\[[\\w/-]+\\])\\]\" \"\\$1\" README.md",
"doctoc": "doctoc README.md && replace \"\\[\\[([\\w/-]+)\\](?:([^\\[\\]]+)\\[([\\w/-]+)\\])?\\]\" \"[\\$1\\$2\\$3]\" README.md",
"test:lint": "eslint .",

@@ -44,2 +44,4 @@ "test:lint-verify-fail": "eslint \"test-lint/*.{js,ts,vue}\" --config .eslintrc.base.js --format json",

"devDependencies": {
"@typescript-eslint/eslint-plugin": "1.1.0",
"@typescript-eslint/parser": "1.1.0",
"babel-eslint": "10.0.1",

@@ -55,7 +57,6 @@ "cross-spawn": "6.0.5",

"eslint-plugin-standard": "4.0.0",
"eslint-plugin-typescript": "1.0.0-rc.1",
"eslint-plugin-unicorn": "7.0.0",
"eslint-plugin-unicorn": "7.1.0",
"eslint-plugin-vue": "github:vuejs/eslint-plugin-vue#9c49dcc8ff792ec6798037bd6b7f4ac3d26fdf68",
"jest": "23.6.0",
"prettier": "1.15.3",
"jest": "24.0.0",
"prettier": "1.16.1",
"replace": "1.0.1",

@@ -62,0 +63,0 @@ "rimraf": "2.6.3",

@@ -21,2 +21,3 @@ # eslint-config-prettier [![Build Status][travis-badge]][travis]

- [Special rules](#special-rules)
- [arrow-body-style and prefer-arrow-callback](#arrow-body-style-and-prefer-arrow-callback)
- [curly](#curly)

@@ -68,2 +69,3 @@ - [lines-around-comment](#lines-around-comment)

- [@typescript-eslint/eslint-plugin]
- [eslint-plugin-babel]

@@ -73,3 +75,2 @@ - [eslint-plugin-flowtype]

- [eslint-plugin-standard]
- [eslint-plugin-typescript]
- [eslint-plugin-unicorn]

@@ -85,2 +86,3 @@ - [eslint-plugin-vue]

"prettier",
"prettier/@typescript-eslint",
"prettier/babel",

@@ -90,3 +92,2 @@ "prettier/flowtype",

"prettier/standard",
"prettier/typescript",
"prettier/unicorn",

@@ -136,8 +137,9 @@ "prettier/vue"

"standard",
"plugin:@typescript-eslint/recommended",
"plugin:flowtype/recommended",
"plugin:react/recommended",
"plugin:typescript/recommended",
"plugin:unicorn/recommended",
"plugin:vue/recommended",
"prettier",
"prettier/@typescript-eslint",
"prettier/babel",

@@ -147,3 +149,2 @@ "prettier/flowtype",

"prettier/standard",
"prettier/typescript",
"prettier/unicorn",

@@ -153,8 +154,8 @@ "prettier/vue"

"plugins": [
"@typescript-eslint",
"babel",
"flowtype",
"prettier",
"react",
"prettier",
"standard",
"typescript",
"unicorn",

@@ -188,2 +189,3 @@ "vue"

problematic.
- Some can cause problems if using [eslint-plugin-prettier] and `--fix`.

@@ -193,2 +195,35 @@ For maximum ease of use, the special rules are disabled by default. If you want

### [arrow-body-style] and [prefer-arrow-callback]
**These rules might cause problems if using [eslint-plugin-prettier] and `--fix`.**
If you use any of these rules together with the `prettier/prettier` rule from
[eslint-plugin-prettier], you can in some cases end up with invalid code due to
a bug in ESLint’s autofix.
These rules are safe to use if:
- You don’t use [eslint-plugin-prettier]. In other words, you run `eslint --fix`
and `prettier --write` as separate steps.
- You _do_ use [eslint-plugin-prettier], but don’t use `--fix`. (But then,
what’s the point?)
You _can_ still use these rules together with [eslint-plugin-prettier] if you
want, because the bug does not occur _all the time._ But if you do, you need to
keep in mind that you might end up with invalid code, where you manually have to
insert a missing closing parenthesis to get going again.
If you’re fixing large of amounts of previously unformatted code, consider
temporarily disabling the `prettier/prettier` rule and running `eslint --fix`
and `prettier --write` separately.
See these issues for more information:
- [eslint-config-prettier#31]
- [eslint-config-prettier#71]
- [eslint-plugin-prettier#65]
When the autofix bug in ESLint has been fixed, the special case for these rules
can be removed.
### [curly]

@@ -728,3 +763,4 @@

- eslint-config-prettier 2.1.1 and older were tested with ESLint 3.x
- prettier 1.15.3
- prettier 1.16.1
- @typescript-eslint/eslint-plugin 1.1.0
- eslint-plugin-babel 5.3.0

@@ -734,4 +770,3 @@ - eslint-plugin-flowtype 3.2.1

- eslint-plugin-standard 4.0.0
- eslint-plugin-typescript 1.0.0-rc.1
- eslint-plugin-unicorn 7.0.0
- eslint-plugin-unicorn 7.1.0
- eslint-plugin-vue 5.1.0

@@ -803,12 +838,16 @@

[@typescript-eslint/eslint-plugin]: https://github.com/typescript-eslint/typescript-eslint
[ESlint 5.7.0]: https://eslint.org/blog/2018/10/eslint-v5.7.0-released
[Prettier]: https://github.com/prettier/prettier
[arrow-body-style]: https://eslint.org/docs/rules/arrow-body-style
[babel/quotes]: https://github.com/babel/eslint-plugin-babel#rules
[curly]: https://eslint.org/docs/rules/curly
[eslint-config-prettier#31]: https://github.com/prettier/eslint-config-prettier/issues/31
[eslint-config-prettier#71]: https://github.com/prettier/eslint-config-prettier/issues/71
[eslint-plugin-babel]: https://github.com/babel/eslint-plugin-babel
[eslint-plugin-flowtype]: https://github.com/gajus/eslint-plugin-flowtype
[eslint-plugin-prettier#65]: https://github.com/prettier/eslint-plugin-prettier/issues/65
[eslint-plugin-prettier]: https://github.com/prettier/eslint-plugin-prettier
[eslint-plugin-react]: https://github.com/yannickcr/eslint-plugin-react
[eslint-plugin-standard]: https://github.com/xjamundx/eslint-plugin-standard
[eslint-plugin-typescript]: https://github.com/bradzacher/eslint-plugin-typescript
[eslint-plugin-unicorn]: https://github.com/sindresorhus/eslint-plugin-unicorn

@@ -827,2 +866,3 @@ [eslint-plugin-vue]: https://github.com/vuejs/eslint-plugin-vue

[overrides]: https://eslint.org/docs/user-guide/configuring#configuration-based-on-glob-patterns
[prefer-arrow-callback]: https://eslint.org/docs/rules/prefer-arrow-callback
[quotes]: https://eslint.org/docs/rules/quotes

@@ -829,0 +869,0 @@ [singleQuote]: https://prettier.io/docs/en/options.html#quotes

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc