Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update linters (major) #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update linters (major) #39

wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Dec 30, 2019

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
eslint-config-prettier ^6.4.0 -> ^9.1.0 age adoption passing confidence
eslint-plugin-node ^10.0.0 -> ^11.1.0 age adoption passing confidence
eslint-plugin-promise ^4.2.1 -> ^6.2.0 age adoption passing confidence
prettier (source) ^1.18.2 -> ^3.3.2 age adoption passing confidence
tslint (source) ^5.20.0 -> ^6.1.3 age adoption passing confidence

Release Notes

prettier/eslint-config-prettier (eslint-config-prettier)

v9.1.0

Compare Source

  • Added: [unicorn/template-indent], (as a [special rule][unicorn/template-indent-special]). Thanks to Gürgün Dayıoğlu (@​gurgunday)!
  • Changed: All the [formatting rules that were deprecated in ESLint 8.53.0][deprecated-8.53.0] are now excluded if you set the ESLINT_CONFIG_PRETTIER_NO_DEPRECATED environment variable.

v9.0.0

Compare Source

  • Added: The CLI helper tool now works with eslint.config.js (flat config). Just like ESLint itself, the CLI tool automatically first tries eslint.config.js and then eslintrc, and you can force which one to use by setting the [ESLINT_USE_FLAT_CONFIG] environment variable. Note that the config of eslint-config-prettier has always been compatible with eslint.config.js (flat config) – it was just the CLI tool that needed updating. On top of that, the docs have been updated to mention how to use both eslint.config.js (flat config) and eslintrc, and the tests now test both config systems.
  • Changed: [unicode-bom] is no longer turned off. Prettier preserves the BOM if you have one, and does not add one if missing. It was wrong of eslint-config-prettier to disable that rule. If you get ESLint errors after upgrading, either add "unicode-bom": "off" to your config to disable it again, or run ESLint with --fix to fix all files according to the rule (add or remove BOM). Thanks to Nicolas Stepien (@​nstepien)!

v8.10.0

Compare Source

  • Added: [max-statements-per-line]. Thanks to @​Zamiell!

v8.9.0

Compare Source

  • Added: [vue/array-element-newline]. Thanks to @​xcatliu!

v8.8.0

Compare Source

v8.7.0

Compare Source

v8.6.0

Compare Source

  • Added: [vue/multiline-ternary]. Thanks to @​xcatliu!

v8.5.0

Compare Source

v8.4.0

Compare Source

v8.3.0

Compare Source

v8.2.0

Compare Source

  • Added: [flowtype/quotes]. Thanks to Martin Zlámal (@​mrtnzlml)!

v8.1.0

Compare Source

  • Added: [flowtype/object-type-curly-spacing].
  • Added: Dummy files for the configs removed in 8.0.0. The dummy files throw an error that try to guide you how to upgrade.

v8.0.0

Compare Source

  • Changed: All configs have been merged into one!

    To upgrade, change:

    {
      "extends": [
        "some-other-config-you-use",
        "prettier",
        "prettier/@​typescript-eslint",
        "prettier/babel",
        "prettier/flowtype",
        "prettier/react",
        "prettier/standard",
        "prettier/unicorn",
        "prettier/vue"
      ]
    }

    Into:

    {
      "extends": [
        "some-other-config-you-use",
        "prettier"
      ]
    }

    The "prettier" config now includes not just ESLint core rules, but also rules from all plugins. Much simpler!

    So … what’s the catch? Why haven’t we done this earlier? Turns out it’s just a sad mistake. I (@​lydell) was confused when testing, and thought that turning off unknown rules in a config was an error. Thanks to Georgii Dolzhykov (@​thorn0) for pointing this out!

    If you use [eslint-plugin-prettier], all you need is [plugin:prettier/recommended]:

    {
      "extends": [
        "some-other-config-you-use",
        "plugin:prettier/recommended"
      ]
    }

    (The ["prettier/prettier" config][prettier-prettier-config] still exists separately. It’s the odd one out. The main "prettier" config does not include the rules from it.)

  • Changed: The CLI helper tool now only prints warnings for [arrow-body-style] and [prefer-arrow-callback], just like other “special rules.” This means that if you’ve decided to use those rules and [eslint-plugin-prettier] at the same time, you’ll get warnings but exit code zero (success).

v7.2.0

Compare Source

v7.1.0

Compare Source

  • Added: [unicorn/empty-brace-spaces]. Thanks to fisker Cheung (@​fisker)!

v7.0.0

Compare Source

  • Changed: At least ESLint 7.0.0 is now required.

  • Changed: [arrow-body-style] and [prefer-arrow-callback] are no longer turned off by default. They only need to be turned off if you use [eslint-plugin-prettier]. If you do, add "prettier/prettier" to your "extends" array to turn them off again.

    {
      "extends": ["prettier", "prettier/prettier"],
      "plugins": ["prettier"],
      "rules": {
        "prettier/prettier": "error"
      }
    }

    Alternatively, update [eslint-plugin-prettier] to version 3.2.0 or later which automatically turns off these two rules in its "plugin:prettier/recommended" config.

    The CLI helper tool only warns about these rules if you have the "prettier/prettier" rule enabled for a file.

  • Changed: no-tabs is now a validatable rule. If you use it, you should enable allowIndentationTabs so that the rule works regardless of your Prettier config:

    {
      "rules": {
        "no-tabs": ["error", { "allowIndentationTabs": true }]
      }
    }
  • Changed: The CLI helper tool is now called just eslint-config-prettier instead of eslint-config-prettier-check. This is so that npx eslint-config-prettier always works regardless of whether you have already installed eslint-config-prettier or not: If you have, the local installation is used; if you haven’t, npx downloads a temporary copy.

  • Changed: The CLI helper tool no longer requires you to pipe the output of eslint --print-config to it. Instead, it does that automatically for you via ESLint API:s added in ESLint v7.

    Before:

    npx eslint --print-config index.js | npx eslint-config-prettier-check
    

    After:

    npx eslint-config-prettier index.js
    
  • Improved: The npm package is now 75% smaller.

v6.15.0

Compare Source

v6.14.0

Compare Source

  • Added: New [eslint-plugin-vue] rules: [vue/array-bracket-newline] and [vue/block-tag-newline]. Thanks to @​xcatliu!

v6.13.0

Compare Source

  • Added: New rules in [eslint-plugin-vue] 7.0 (which supports Vue 3.0). Thanks to @​xcatliu!

v6.12.0

Compare Source

v6.11.0

Compare Source

v6.10.1

Compare Source

  • Improved: Recommend using npx when running the CLI helper tool.
  • Updated: Mention that eslint-config-prettier has been tested with Prettier 2.0 and the latest versions of plugins.

v6.10.0

Compare Source

v6.9.0

Compare Source

v6.8.0

Compare Source

v6.7.0

Compare Source

v6.6.0

Compare Source

  • Added: New [eslint-plugin-vue] rules: [vue/dot-location] and [vue/keyword-spacing]. Thanks to @​xcatliu!

v6.5.0

Compare Source

  • Added: Support for [excluding deprecated rules]. Thanks to Alex Ilyaev (@​alexilyaev)!
mysticatea/eslint-plugin-node (eslint-plugin-node)

v11.1.0

Compare Source

The many rules for Node.js in the ESLint core will be deprecated in ESLint 7.0.0. This release includes the clone of those core rules.

✨ Enhancements

v11.0.0

Compare Source

💥 Breaking changes
  • b6cb9a0 updated node/no-unsupported-features/node-builtins rule based on Node.js 13.2.0.
  • fb9ce15 updated node/no-unsupported-features/es-syntax rule to recognize BigInt literal property names.
  • 4295f6a updated the rules that check global variables to recognize globalThis.*.
  • 04051ed updated node/no-unsupported-features/es-builtins rule to recognize globalThis.
✨ Enhancements
  • 276a9ad updated node/no-deprecated-api rule to allow revoked deprecations.
  • 972f828 updated node/no-unsupported-features/node-builtins rule to handle backporting properly.
🐛 Bug fixes
  • 4f74fbf fixed a crash bug around dynamic import syntax.
eslint-community/eslint-plugin-promise (eslint-plugin-promise)

v6.2.0

Compare Source

v6.1.1

Compare Source

Bug Fixes
  • no-multiple-resolved: false positives when the last expression in a try block is a call to resolve (#​384) (dc51b1c)

v6.1.0

Compare Source

Bug Fixes
Features
  • add no-multiple-resolved rule (#​369) (3a6fdbe)
  • always-return: add ignoreLastCallback option (#​365) (01def31)
  • catch-or-return,no-new-statics,no-promise-in-callback,valid-params: add support for Promise.allSettled() & Promise.any() (#​370) (e080f82)
  • param-names: add resolvePattern & rejectPattern option (#​368) (df25e3c)

v6.0.1

Compare Source

v6.0.0

Compare Source

v5.2.0

Compare Source

  • Updated param-names rule to allow for unused params

v5.1.1

Compare Source

  • Updated docs to include no-callback-in-promise reasons #​215

v5.1.0

Compare Source

  • Included catch() and finally() in prefer-await-to-then #​196
  • Added some additional tests and upgraded some dev deps #​196
  • Exempted array methods in prefer-await-to-callbacks
    (#​212)

v5.0.0

Compare Source

  • ESLint 7.0 Support

v4.3.1

Compare Source

  • Updated and applied prettier

v4.3.0

Compare Source

prettier/prettier (prettier)

v3.3.2

Compare Source

diff

Fix handlebars path expressions starts with @ (#​16358 by @​Princeyadav05)
{{! Input }}
<div>{{@&#8203;x.y.z}}</div>

{{! Prettier 3.3.1 }}
<div>{{@&#8203;x}}</div>

{{! Prettier 3.3.2 }}
<div>{{@&#8203;x.y.z}}</div>

v3.3.1

Compare Source

diff

Preserve empty lines in front matter (#​16347 by @​fisker)
<!-- Input -->
---
foo:
  - bar1

  - bar2

  - bar3
---
Markdown

<!-- Prettier 3.3.0 -->

---
foo:
  - bar1
  - bar2
  - bar3
---

Markdown

<!-- Prettier 3.3.1 -->
---
foo:
  - bar1

  - bar2

  - bar3
---

Markdown
Preserve explicit language in front matter (#​16348 by @​fisker)
<!-- Input -->
---yaml
title: Hello
slug: home
---

<!-- Prettier 3.3.0 -->
---
title: Hello
slug: home
---

<!-- Prettier 3.3.1 -->
---yaml
title: Hello
slug: home
---
Avoid line breaks in import attributes (#​16349 by @​fisker)
// Input
import something from "./some-very-very-very-very-very-very-very-very-long-path.json" with { type: "json" };

// Prettier 3.3.0
import something from "./some-very-very-very-very-very-very-very-very-long-path.json" with { type:
  "json" };

// Prettier 3.3.1
import something from "./some-very-very-very-very-very-very-very-very-long-path.json" with { type: "json" };

v3.3.0

Compare Source

diff

🔗 Release Notes

v3.2.5

Compare Source

diff

Support Angular inline styles as single template literal (#​15968 by @​sosukesuzuki)

Angular v17 supports single string inline styles.

// Input
@&#8203;Component({
  template: `<div>...</div>`,
  styles: `h1 { color: blue; }`,
})
export class AppComponent {}

// Prettier 3.2.4
@&#8203;Component({
  template: `<div>...</div>`,
  styles: `h1 { color: blue; }`,
})
export class AppComponent {}

// Prettier 3.2.5
@&#8203;Component({
  template: `<div>...</div>`,
  styles: `
    h1 {
      color: blue;
    }
  `,
})
export class AppComponent {}
Unexpected embedded formatting for Angular template (#​15969 by @​JounQin)

Computed template should not be considered as Angular component template

// Input
const template = "foobar";

@&#8203;Component({
  [template]: `<h1>{{       hello }}</h1>`,
})
export class AppComponent {}

// Prettier 3.2.4
const template = "foobar";

@&#8203;Component({
  [template]: `<h1>{{ hello }}</h1>`,
})
export class AppComponent {}

// Prettier 3.2.5
const template = "foobar";

@&#8203;Component({
  [template]: `<h1>{{       hello }}</h1>`,
})
export class AppComponent {}
Use "json" parser for tsconfig.json by default (#​16012 by @​sosukesuzuki)

In v2.3.0, we introduced "jsonc" parser which adds trialing comma by default.

When adding a new parser we also define how it will be used based on the linguist-languages data.

tsconfig.json is a special file used by TypeScript, it uses .json file extension, but it actually uses the JSON with Comments syntax. However, we found that there are many third-party tools not recognize it correctly because of the confusing .json file extension.

We decide to treat it as a JSON file for now to avoid the extra configuration step.

To keep using the "jsonc" parser for your tsconfig.json files, add the following to your .pretterrc file

{
  "overrides": [
    {
      "files": ["tsconfig.json", "jsconfig.json"],
      "options": {
        "parser": "jsonc"
      }
    }
  ]
}

v3.2.4

Compare Source

diff

Fix incorrect parser inference (#​15947 by @​fisker)

Files like .eslintrc.json were incorrectly formatted as JSONC files.

// Input
prettier --file-info .eslintrc.json
{ "ignored": false, "inferredParser": "jsonc" }

// Prettier 3.2.4
prettier --file-info .eslintrc.json
{ "ignored": false, "inferredParser": "json" }

v3.2.3

Compare Source

diff

Throw errors for invalid code (#​15881 by @​fisker, @​Josh-Cena, @​auvred)
// Input
1++;

// Prettier 3.2.2
1++;

// Prettier 3.2.3
SyntaxError: Invalid left-hand side expression in unary operation (1:1)
> 1 | 1++;
    | ^
// Input
try {} catch (error = 1){}

// Prettier 3.2.2
try {
} catch (error) {}

// Prettier 3.2.3
SyntaxError: Catch clause variable cannot have an initializer. (1:23)
> 1 | try {} catch (error = 1){}
    |                       ^
Fix parser inference (#​15927 by @​fisker)
// Prettier 3.2.2
prettier --file-info tsconfig.json
{ "ignored": false, "inferredParser": "json" }

// Prettier 3.2.3
prettier --file-info tsconfig.json
{ "ignored": false, "inferredParser": "jsonc" }

v3.2.2

Compare Source

diff

Fix crash when parsing template literal CSS in a JSX style tag using a spread attribute (#​15896 by @​eelco)

For example this code would crash before:

<style {...spread}>{`.{}`}</style>
Fix formatting error on optional call expression and member chain (#​15920 by @​sosukesuzuki)
// Input
a(() => {}, c?.d());

// Prettier 3.2.1
TypeError: Cannot read properties of undefined (reading 'type')

// Prettier 3.2.2
a(() => {}, c?.d());

v3.2.1

Compare Source

diff

Fix formatting error on member chain (#​15915 by @​sosukesuzuki)
// Input
test().test2().test2(thing?.something);

// Prettier 3.2.0
TypeError: Cannot read properties of undefined (reading 'type')

// Prettier 3.2.1
test().test2().test2(thing?.something);

v3.2.0

Compare Source

diff

🔗 Release Notes

v3.1.1

Compare Source

diff

Fix config file search (#​15363 by @​fisker)

Previously, we start search for config files from the filePath as a directory, if it happened to be a directory and contains config file, it will be used by mistake.

├─ .prettierrc
└─ test.js         (A directory)
  └─ .prettierrc
// Prettier 3.1.0
await prettier.resolveConfigFile(new URL("./test.js", import.meta.url));
// <CWD>/test.js/.prettierrc

// Prettier 3.1.1
await prettier.resolveConfigFile(new URL("./test.js", import.meta.url));
// <CWD>/.prettierrc
Skip explicitly passed symbolic links with --no-error-on-unmatched-pattern (#​15533 by @​sanmai-NL)

Since Prettier v3, we stopped following symbolic links, however in some use cases, the symbolic link patterns can't be filtered out, and there is no way to prevent Prettier from throwing errors.

In Prettier 3.1.1, you can use --no-error-on-unmatched-pattern to simply skip symbolic links.

Consistently use tabs in ternaries when useTabs is true (#​15662 by @​auvred)
// Input
aaaaaaaaaaaaaaa
	? bbbbbbbbbbbbbbbbbb
	: ccccccccccccccc
	  ? ddddddddddddddd
	  : eeeeeeeeeeeeeee
	    ? fffffffffffffff
	    : gggggggggggggggg;

// Prettier 3.1.0
aaaaaaaaaaaaaaa
	? bbbbbbbbbbbbbbbbbb
	: ccccccccccccccc
	  ? ddddddddddddddd
	  : eeeeeeeeeeeeeee
	    ? fffffffffffffff
	    : gggggggggggggggg;

// Prettier 3.1.1
aaaaaaaaaaaaaaa
	? bbbbbbbbbbbbbbbbbb
	: ccccccccccccccc
		? ddddddddddddddd
		: eeeeeeeeeeeeeee
			? fffffffffffffff
			: gggggggggggggggg;
Improve config file search (#​15663 by @​fisker)

The Prettier config file search performance has been improved by more effective cache strategy.

Fix unstable and ugly formatting for comments in destructuring patterns (#​15708 by @​sosukesuzuki)
// Input
const {
  foo,
  // bar
  // baz
}: Foo = expr;

// Prettier 3.1.0
const {
  foo1,
} // bar
// baz
: Foo = expr;

// Prettier 3.1.0 second output
const {
  foo1, // bar
} // baz
: Foo = expr;

// Prettier 3.1.1
const {
  foo1,
  // bar
  // baz
}: Foo = expr;
Support "Import Attributes" (#​15718 by @​fisker)

TypeScript 5.3 supports the latest updates to the import attributes proposal.

import something from "./something.json" with { type: "json" };
Fix false claim in docs that cursorOffset is incompatible with rangeStart/rangeEnd (#​15750 by @​ExplodingCabbage)

The cursorOffset option has in fact been compatible with rangeStart/rangeEnd for over 5 years, thanks to work by @​ds300. However, Prettier's documentation (including the CLI --help text) continued to claim otherwise, falsely. The documentation is now fixed.

Keep curly braces and from keyword in empty import statements (#​15756 by @​fisker)
// Input
import { } from 'foo';
import { /* comment */ } from 'bar';

// Prettier 3.1.0
import {} from "foo";
import /* comment */ "bar";

// Prettier 3.1.1
import {} from "foo";
import {} from /* comment */ "bar";
Keep empty import attributes and assertions (#​15757 by @​fisker)
// Input
import foo from "foo" with {};
import bar from "bar" assert {};

// Prettier 3.1.0
import foo from "foo";
import bar from "bar";

// Prettier 3.1.1
import foo from "foo" with {};
import bar from "bar" assert {};

v3.1.0

Compare Source

diff

🔗 Release Notes

v3.0.3

Compare Source

diff

Add preferUnplugged: true to package.json (#​15169 by @​fisker and @​so1ve)

Prettier v3 uses dynamic imports, user will need to unplug Prettier when Yarn's PnP mode is enabled, add preferUnplugged: true to package.json, so Yarn will install Prettier as unplug by default.

Support shared config that forbids require() (#​15233 by @​fisker)

If an external shared config package is used, and the package exports don't have require or default export.

In Prettier 3.0.2 Prettier fails when attempt to require() the package, and throws an error.

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in <packageName>/package.json
Allow argument of require() to break (#​15256 by @​fisker)
// Input
const plugin = require(
  global.STANDALONE
    ? path.join(__dirname, "../standalone.js")
    : path.join(__dirname, "..")
);

// Prettier 3.0.2
const plugin = require(global.STANDALONE
  ? path.join(__dirname, "../standalone.js")
  : path.join(__dirname, ".."));

// Prettier 3.0.3
const plugin = require(
  global.STANDALONE
    ? path.join(__dirname, "../standalone.js")
    : path.join(__dirname, "..")
);
Do not print trailing commas in arrow function type parameter lists in ts code blocks (#​15286 by @​sosukesuzuki)
<!-- Input -->
```ts
const foo = <T>() => {}
```

<!-- Prettier 3.0.2 -->
```ts
const foo = <T,>() => {}
```

<!-- Prettier 3.0.3 -->
```ts
const foo = <T>() => {}
```
Support TypeScript 5.2 using / await using declaration (#​15321 by @​sosukesuzuki)

Support for the upcoming Explicit Resource Management feature in ECMAScript. using / await using declaration

{
   using foo = new Foo();
   await using bar = new Bar();
}

v3.0.2

Compare Source

diff

Break after = of assignment if RHS is poorly breakable AwaitExpression or YieldExpression (#​15204 by @​seiyab)
// Input
const { section, rubric, authors, tags } = await utils.upsertCommonData(mainData);

// Prettier 3.0.1
const { section, rubric, authors, tags } = await utils.upsertCommonData(
  mainData,
);

// Prettier 3.0.2
const { section, rubric, authors, tags } =
  await utils.upsertCommonData(mainData);
Do not add trailing comma for grouped scss comments (#​15217 by @​auvred)
/* Input */
$foo: (
	'property': (),
	// comment 1
	// comment 2
)

/* Prettier 3.0.1 */
$foo: (
  "property": (),
  // comment 1
  // comment 2,
);

/* Prettier 3.0.2 */
$foo: (
  "property": (),
  // comment 1
  // comment 2
);
Print declare and export keywords for nested namespace (#​15249 by @​sosukesuzuki)
// Input
declare namespace abc1.def {}
export namespace abc2.def {}

// Prettier 3.0.1
namespace abc1.def {}
namespace abc2.def {}

// Prettier 3.0.2
declare namespace abc1.def {}
export namespace abc2.def {}

v3.0.1

Compare Source

diff

Fix cursor positioning for a special case (#​14812 by @​fisker)
// <|> is the cursor position

/* Input */
// All messages are represented in JSON.
// So, the prettier.py controls a subprocess which spawns "node {this_file}".
import {<|>  } from "fs"

/* Prettier 3.0.0 */
// All messages are represented in JSON.
// So, the prettier.py <|>controls a subprocess which spawns "node {this_file}".
import {} from "fs"

/* Prettier 3.0.1 */
// All messages are represented in JSON.
// So, the prettier.py controls a subprocess which spawns "node {this_file}".
import {<|>} from "fs"
Fix plugins/estree.d.ts to make it a module (#​15018 by @​kingyue737)

Add export {} in plugins/estree.d.ts to fix the "File is not a module" error

Add parenthesis around leading multiline comment in return statement (#​15037 by @​auvred)
// Input
function fn() {
  return (
    /**
     * @&#8203;type {...}
     */ expresssion
  )
}

// Prettier 3.0.0
function fn() {
  return /**
   * @&#8203;type {...}
   */ expresssion;
}

// Prettier 3.0.1
function fn() {
  return (
    /**
     * @&#8203;type {...}
     */ expresssion
  );
}
Add support for Vue "Generic Components" (#​15066 by @​auvred)

https://blog.vuejs.org/posts/vue-3-3#generic-components

<!-- Input -->
<script setup lang="ts" generic="T extends Type1 & Type2 & (Type3 | Type4), U extends string | number | boolean"></script>

<!-- Prettier 3.0.0 -->
<script
  setup
  lang="ts"
  generic="T extends Type1 & Type2 & (Type3 | Type4), U extends string | number | boolean"
></script>

<!-- Prettier 3.0.1 -->
<script
  setup
  lang="ts"
  generic="
    T extends Type1 & Type2 & (Type3 | Type4),
    U extends string | number | boolean
  "
></script>
Fix comments print in IfStatement (#​15076 by @​fisker)
function a(b) {
  if (b) return 1; // comment
  else return 2;
}

/* Prettier 3.0.0 */
Error: Comment "comment" was not printed. Please report this error!

/* Prettier 3.0.1 */
function a(b) {
  if (b) return 1; // comment
  else return 2;
}
Add missing type definition for printer.preprocess (#​15123 by @​so1ve)
export interface Printer<T = any> {
  // ...
+ preprocess?:
+   | ((ast: T, options: ParserOptions<T>) => T | Promise<T>)
+   | undefined;
}
Add missing getVisitorKeys method type definition for Printer (#​15125 by @​auvred)
const printer: Printer = {
  print: () => [],
  getVisitorKeys(node, nonTraversableKeys) {
    return ["body"];
  },
};
Add typing to support readonly array properties of AST Node (#​15127 by @​auvred)
// Input
interface TestNode {
  readonlyArray: readonly string[];
}

declare const path: AstPath<TestNode>;

path.map(() => "", "readonlyArray");

// Prettier 3.0.0
interface TestNode {
  readonlyArray: readonly string[];
}

declare const path: AstPath<TestNode>;

path.map(() => "", "readonlyArray");
//                  ^ Argument of type '"readonlyArray"' is not assignable to parameter of type '"regularArray"'. ts(2345)

// Prettier 3.0.1
interface TestNode {
  readonlyArray: readonly string[];
}

declare const path: AstPath<TestNode>;

path.map(() => "", "readonlyArray");
Add space before unary minus followed by a function call (#​15129 by @​pamelalozano)
// Input
div {
  margin: - func();
}

// Prettier 3.0.0
div {
  margin: -func();
}

// Prettier 3.0.1
div {
  margin: - func();
}

v3.0.0

Compare Source

diff

🔗 Release Notes

v2.8.8

Compare Source

This version is a republished version of v2.8.7.
A bad version was accidentally published and it can't be unpublished, apologies for the churn.

v2.8.7

Compare Source

diff

Allow multiple decorators on same getter/setter (#​14584 by @​fisker)
// Input
class A {
  @&#8203;decorator()
  get foo () {}
  
  @&#8203;decorator()
  set foo (value) {}
}

// Prettier 2.8.6
SyntaxError: Decorators cannot be applied to multiple get/set accessors of the same name. (5:3)
  3 |   get foo () {}
  4 |   
> 5 |   @&#8203;decorator()
    |   ^^^^^^^^^^^^
  6 |   set foo (value) {}
  7 | }

// Prettier 2.8.7
class A {
  @&#8203;decorator()
  get foo() {}

  @&#8203;decorator()
  set foo(value) {}
}

v2.8.6

Compare Source

diff

Allow decorators on private members and class expressions (#​14548 by @​fisker)
// Input
class A {
  @&#8203;decorator()
  #privateMethod () {}
}

// Prettier 2.8.5
SyntaxError: Decorators are not valid here. (2:3)
  1 | class A {
> 2 |   @&#8203;decorator()
    |   ^^^^^^^^^^^^
  3 |   #privateMethod () {}
  4 | }

// Prettier 2.8.6
class A {
  @&#8203;decorator()
  #privateMethod() {}
}

v2.8.5

Compare Source

diff

Support TypeScript 5.0 (#​14391 by @​fisker, #​13819 by @​fisker, @​sosukesuzuki)

TypeScript 5.0 introduces two new syntactic features:

  • const modifiers for type parameters
  • export type * declarations
Add missing parentheses for decorator (#​14393 by @​fisker)
// Input
class Person {
  @&#8203;(myDecoratorArray[0])
  greet() {}
}

// Prettier 2.8.4
class Person {
  @&#8203;myDecoratorArray[0]
  greet() {}
}

// Prettier 2.8.5
class Person {
  @&#8203;(myDecoratorArray[0])
  greet() {}
}
Add parentheses for TypeofTypeAnnotation to improve readability (#​14458 by @​fisker)
// Input
type A = (typeof node.children)[];

// Prettier 2.8.4
type A = typeof node.children[];

// Prettier 2.8.5
type A = (typeof node.children)[];
Suppo

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@coveralls
Copy link

coveralls commented Dec 30, 2019

Coverage Status

Coverage decreased (-1.2%) to 70.874% when pulling 0ca098c on renovate/major-linters into bc629d6 on master.

@renovate renovate bot force-pushed the renovate/major-linters branch from ed1f781 to 761bc07 Compare May 2, 2020 15:55
@renovate renovate bot force-pushed the renovate/major-linters branch from 761bc07 to 2c46da3 Compare May 15, 2020 11:50
@renovate renovate bot changed the title Update dependency eslint-plugin-node to v11 Update linters (major) May 15, 2020
@renovate renovate bot force-pushed the renovate/major-linters branch 2 times, most recently from 1690eb4 to b6ad342 Compare July 5, 2020 15:58
@renovate renovate bot force-pushed the renovate/major-linters branch from 5e40e0e to 7d664b2 Compare May 9, 2021 21:30
@renovate renovate bot force-pushed the renovate/major-linters branch from 7d664b2 to 0ca098c Compare June 6, 2021 21:17
@renovate renovate bot force-pushed the renovate/major-linters branch from 26e8b26 to 59a6366 Compare May 15, 2022 18:15
@renovate renovate bot force-pushed the renovate/major-linters branch 2 times, most recently from a7514d2 to 01b577d Compare March 29, 2023 23:03
@renovate renovate bot force-pushed the renovate/major-linters branch 2 times, most recently from f5b9d9a to 57c6963 Compare June 3, 2023 00:41
@renovate renovate bot force-pushed the renovate/major-linters branch 2 times, most recently from 1476386 to 03aa00a Compare August 29, 2023 14:36
@renovate renovate bot force-pushed the renovate/major-linters branch 2 times, most recently from d6d2222 to 995c6d6 Compare November 17, 2023 23:00
@renovate renovate bot force-pushed the renovate/major-linters branch 2 times, most recently from 472838a to c0ab517 Compare December 2, 2023 10:22
@renovate renovate bot force-pushed the renovate/major-linters branch 2 times, most recently from 959a98b to 87da268 Compare December 16, 2023 00:40
@renovate renovate bot force-pushed the renovate/major-linters branch 5 times, most recently from 91b5a84 to 7102565 Compare January 17, 2024 11:09
@renovate renovate bot force-pushed the renovate/major-linters branch 2 times, most recently from 1641fdb to 122f433 Compare April 22, 2024 22:46
@renovate renovate bot force-pushed the renovate/major-linters branch from 122f433 to 77f692f Compare May 3, 2024 21:08
@renovate renovate bot force-pushed the renovate/major-linters branch 2 times, most recently from 3985a48 to 20df33e Compare June 1, 2024 19:14
@renovate renovate bot force-pushed the renovate/major-linters branch from 20df33e to 20b2615 Compare June 5, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant