diff --git a/.eslintrc.json b/.eslintrc.json index 7a65cd5d6bcc7d..84b12b34eef056 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -54,25 +54,26 @@ "prefer-const": 2, "prefer-regex-literals": 1, "require-await": 2, - "spaced-comment": 2, - // layout & formatting - "arrow-parens": 2, - "arrow-spacing": 2, - "comma-spacing": 2, - "comma-style": 2, - "func-call-spacing": 2, - "keyword-spacing": 2, - "linebreak-style": 2, - "lines-around-comment": 2, - "no-multiple-empty-lines": 2, - "no-trailing-spaces": 2, - "rest-spread-spacing": 2, - "semi": 2, - "space-before-blocks": 2, - "space-in-parens": 2, - "space-infix-ops": 2, - "space-unary-ops": 2, // plugin specific + // previous eslint formatting rules + "@stylistic/js/arrow-parens": 2, + "@stylistic/js/arrow-spacing": 2, + "@stylistic/js/comma-spacing": 2, + "@stylistic/js/comma-style": 2, + "@stylistic/js/function-call-spacing": 2, + "@stylistic/js/keyword-spacing": 2, + "@stylistic/js/linebreak-style": 2, + "@stylistic/js/lines-around-comment": 2, + "@stylistic/js/no-multiple-empty-lines": 2, + "@stylistic/js/no-trailing-spaces": 2, + "@stylistic/js/rest-spread-spacing": 2, + "@stylistic/js/semi": 2, + "@stylistic/js/space-before-blocks": 2, + "@stylistic/js/space-in-parens": 2, + "@stylistic/js/space-infix-ops": 2, + "@stylistic/js/space-unary-ops": 2, + "@stylistic/js/spaced-comment": 2, + // https://github.com/eslint-community/eslint-plugin-n "n/no-extraneous-require": [ "error", { diff --git a/package.json b/package.json index a56198cc668dc3..897330ddd02a19 100644 --- a/package.json +++ b/package.json @@ -150,6 +150,7 @@ }, "devDependencies": { "@microsoft/eslint-formatter-sarif": "3.0.0", + "@stylistic/eslint-plugin-js": "1.2.0", "@types/aes-js": "3.1.4", "@types/crypto-js": "4.2.1", "@types/eslint": "8.44.6", @@ -157,6 +158,7 @@ "@types/etag": "1.8.3", "@types/fs-extra": "11.0.4", "@types/git-rev-sync": "2.0.2", + "@types/html-to-text": "9.0.4", "@types/imapflow": "1.0.16", "@types/jsdom": "21.1.5", "@types/json-bigint": "1.0.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d1cf1803a38e16..5b8d74143ed47b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -202,6 +202,9 @@ devDependencies: '@microsoft/eslint-formatter-sarif': specifier: 3.0.0 version: 3.0.0 + '@stylistic/eslint-plugin-js': + specifier: 1.2.0 + version: 1.2.0 '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -223,6 +226,9 @@ devDependencies: '@types/git-rev-sync': specifier: 2.0.2 version: 2.0.2 + '@types/html-to-text': + specifier: 9.0.4 + version: 9.0.4 '@types/imapflow': specifier: 1.0.16 version: 1.0.16 @@ -1313,6 +1319,16 @@ packages: '@sinonjs/commons': 3.0.0 dev: true + /@stylistic/eslint-plugin-js@1.2.0: + resolution: {integrity: sha512-1Zi/AlQzOzTlTegupd3vrUYHd02ilvk7x5O9ZRFjYGtUcwHVk+WTEKk/3Nmr8yuvzEiXqUNFJ8bv8b4rLYCPRQ==} + dependencies: + acorn: 8.11.2 + escape-string-regexp: 4.0.0 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + graphemer: 1.4.0 + dev: true + /@szmarczak/http-timer@4.0.6: resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==} engines: {node: '>=10'} @@ -1489,6 +1505,10 @@ packages: '@types/node': 20.5.6 dev: true + /@types/html-to-text@9.0.4: + resolution: {integrity: sha512-pUY3cKH/Nm2yYrEmDlPR1mR7yszjGx4DrwPjQ702C4/D5CwHuZTgZdIdwPkRbcuhs7BAh2L5rg3CL5cbRiGTCQ==} + dev: true + /@types/http-assert@1.5.3: resolution: {integrity: sha512-FyAOrDuQmBi8/or3ns4rwPno7/9tJTijVW6aQQjK02+kOQ8zmoNg2XJtAuQhvQcy1ASJq38wirX5//9J1EqoUA==} dev: true @@ -1863,6 +1883,12 @@ packages: hasBin: true dev: true + /acorn@8.11.2: + resolution: {integrity: sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + /aes-js@3.1.2: resolution: {integrity: sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==} dev: false