From 7e4dd5ac4eff273f1968e77d8b7e4aa01a1e7aed Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Fri, 27 Dec 2019 15:14:23 +0900 Subject: [PATCH] Make the indent rules supports ECMAScript 2020 --- docs/rules/html-indent.md | 2 +- lib/utils/indent-common.js | 107 ++++++++++++++---- package.json | 2 +- .../nullish-coalescing-operator-01.vue | 7 ++ .../html-indent/optional-chaining-01.vue | 9 ++ .../html-indent/optional-chaining-02.vue | 9 ++ .../html-indent/optional-chaining-03.vue | 9 ++ .../html-indent/optional-chaining-04.vue | 15 +++ tests/fixtures/script-indent/bigint-01.vue | 7 ++ .../export-all-declaration-02.vue | 16 +++ .../script-indent/for-await-of-01.vue | 15 +++ .../script-indent/import-expression-01.vue | 7 ++ .../script-indent/import-expression-02.vue | 8 ++ .../script-indent/import-expression-03.vue | 11 ++ .../nullish-coalescing-operator-01.vue | 6 + .../script-indent/object-expression-04.vue | 12 ++ .../script-indent/optional-chaining-01.vue | 7 ++ .../script-indent/optional-chaining-02.vue | 7 ++ .../script-indent/optional-chaining-03.vue | 7 ++ .../script-indent/optional-chaining-04.vue | 13 +++ .../script-indent/optional-chaining-05.vue | 11 ++ .../script-indent/optional-chaining-06.vue | 25 ++++ .../script-indent/optional-chaining-07.vue | 25 ++++ .../script-indent/optional-chaining-08.vue | 12 ++ .../script-indent/optional-chaining-09.vue | 32 ++++++ .../script-indent/rest-properties-01.vue | 8 ++ .../script-indent/try-statement-04.vue | 14 +++ tests/lib/rules/html-indent.js | 10 +- tests/lib/rules/script-indent.js | 10 +- typings/eslint-plugin-vue/global.d.ts | 3 + .../eslint-plugin-vue/util-types/ast/ast.ts | 4 + .../util-types/ast/es-ast.ts | 20 +++- 32 files changed, 420 insertions(+), 30 deletions(-) create mode 100644 tests/fixtures/html-indent/nullish-coalescing-operator-01.vue create mode 100644 tests/fixtures/html-indent/optional-chaining-01.vue create mode 100644 tests/fixtures/html-indent/optional-chaining-02.vue create mode 100644 tests/fixtures/html-indent/optional-chaining-03.vue create mode 100644 tests/fixtures/html-indent/optional-chaining-04.vue create mode 100644 tests/fixtures/script-indent/bigint-01.vue create mode 100644 tests/fixtures/script-indent/export-all-declaration-02.vue create mode 100644 tests/fixtures/script-indent/for-await-of-01.vue create mode 100644 tests/fixtures/script-indent/import-expression-01.vue create mode 100644 tests/fixtures/script-indent/import-expression-02.vue create mode 100644 tests/fixtures/script-indent/import-expression-03.vue create mode 100644 tests/fixtures/script-indent/nullish-coalescing-operator-01.vue create mode 100644 tests/fixtures/script-indent/object-expression-04.vue create mode 100644 tests/fixtures/script-indent/optional-chaining-01.vue create mode 100644 tests/fixtures/script-indent/optional-chaining-02.vue create mode 100644 tests/fixtures/script-indent/optional-chaining-03.vue create mode 100644 tests/fixtures/script-indent/optional-chaining-04.vue create mode 100644 tests/fixtures/script-indent/optional-chaining-05.vue create mode 100644 tests/fixtures/script-indent/optional-chaining-06.vue create mode 100644 tests/fixtures/script-indent/optional-chaining-07.vue create mode 100644 tests/fixtures/script-indent/optional-chaining-08.vue create mode 100644 tests/fixtures/script-indent/optional-chaining-09.vue create mode 100644 tests/fixtures/script-indent/rest-properties-01.vue create mode 100644 tests/fixtures/script-indent/try-statement-04.vue diff --git a/docs/rules/html-indent.md b/docs/rules/html-indent.md index d82ff86eb..c3a45f273 100644 --- a/docs/rules/html-indent.md +++ b/docs/rules/html-indent.md @@ -15,7 +15,7 @@ description: enforce consistent indentation in `