Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/aws-cdk/lib/parse-command-line-arguments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// GENERATED FROM packages/aws-cdk/lib/config.ts.
// Do not edit by hand; all changes will be overwritten at build time from the config file.
// -------------------------------------------------------------------------------------------
/* eslint-disable @typescript-eslint/comma-dangle, comma-spacing, max-len, quotes, quote-props */
/* eslint-disable @stylistic/comma-dangle, comma-spacing, max-len, quotes, quote-props */
import { Argv } from 'yargs';
import * as helpers from './util/yargs-helpers';

Expand Down
5 changes: 3 additions & 2 deletions packages/awslint/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
'@typescript-eslint',
'import',
'@cdklabs',
'@stylistic',
'jest',
],
parser: '@typescript-eslint/parser',
Expand Down Expand Up @@ -38,11 +39,11 @@ module.exports = {
'@cdklabs/invalid-cfn-imports': ['error'],
// Require use of the `import { foo } from 'bar';` form instead of `import foo = require('bar');`
'@typescript-eslint/no-require-imports': ['error'],
'@typescript-eslint/indent': ['error', 2],
'@stylistic/indent': ['error', 2],

// Style
'quotes': ['error', 'single', { avoidEscape: true }],
'comma-dangle': ['error', 'always-multiline'], // ensures clean diffs, see https://medium.com/@nikgraf/why-you-should-enforce-dangling-commas-for-multiline-statements-d034c98e36f8
'@stylistic/comma-dangle': ['error', 'always-multiline'], // ensures clean diffs, see https://medium.com/@nikgraf/why-you-should-enforce-dangling-commas-for-multiline-statements-d034c98e36f8
'comma-spacing': ['error', { before: false, after: true }], // space after, no space before
'no-multi-spaces': ['error', { ignoreEOLComments: false }], // no multi spaces
'array-bracket-spacing': ['error', 'never'], // [1, 2, 3]
Expand Down
5 changes: 3 additions & 2 deletions packages/awslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@
"@types/fs-extra": "^9.0.13",
"@types/jest": "^29.5.14",
"@types/yargs": "^15.0.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^8",
"@stylistic/eslint-plugin": "^2",
"@typescript-eslint/parser": "^8",
"eslint": "^7.32.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-import-resolver-typescript": "^2.7.1",
Expand Down
7 changes: 4 additions & 3 deletions tools/@aws-cdk/cdk-build-tools/config/eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports = {
'@typescript-eslint',
'import',
'@cdklabs',
'@stylistic',
'jest',
],
parser: '@typescript-eslint/parser',
Expand Down Expand Up @@ -52,12 +53,12 @@ module.exports = {

// Require use of the `import { foo } from 'bar';` form instead of `import foo = require('bar');`
'@typescript-eslint/no-require-imports': ['error'],
'@typescript-eslint/indent': ['error', 2],
'@stylistic/indent': ['error', 2],

// Style
'quotes': ['error', 'single', { avoidEscape: true }],
'@typescript-eslint/member-delimiter-style': ['error'], // require semicolon delimiter
'@typescript-eslint/comma-dangle': ['error', 'always-multiline'], // ensures clean diffs, see https://medium.com/@nikgraf/why-you-should-enforce-dangling-commas-for-multiline-statements-d034c98e36f8
'@stylistic/member-delimiter-style': ['error'], // require semicolon delimiter
'@stylistic/comma-dangle': ['error', 'always-multiline'], // ensures clean diffs, see https://medium.com/@nikgraf/why-you-should-enforce-dangling-commas-for-multiline-statements-d034c98e36f8
'comma-spacing': ['error', { before: false, after: true }], // space after, no space before
'no-multi-spaces': ['error', { ignoreEOLComments: false }], // no multi spaces
'array-bracket-spacing': ['error', 'never'], // [1, 2, 3]
Expand Down
5 changes: 3 additions & 2 deletions tools/@aws-cdk/cdk-build-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@
"@cdklabs/eslint-plugin": "^1.0.0",
"@aws-cdk/yarn-cling": "0.0.0",
"@aws-cdk/node-bundle": "0.0.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^8",
"@stylistic/eslint-plugin": "^2",
"@typescript-eslint/parser": "^8",
"awslint": "0.0.0",
"chalk": "^4",
"eslint": "^7.32.0",
Expand Down
9 changes: 4 additions & 5 deletions tools/@aws-cdk/node-bundle/.eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions tools/@aws-cdk/node-bundle/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions tools/@aws-cdk/pkglint/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
'@typescript-eslint',
'import',
'@cdklabs',
'@stylistic',
'jest',
],
parser: '@typescript-eslint/parser',
Expand Down Expand Up @@ -38,11 +39,11 @@ module.exports = {
'@cdklabs/invalid-cfn-imports': ['error'],
// Require use of the `import { foo } from 'bar';` form instead of `import foo = require('bar');`
'@typescript-eslint/no-require-imports': ['error'],
'@typescript-eslint/indent': ['error', 2],
'@stylistic/indent': ['error', 2],

// Style
'quotes': ['error', 'single', { avoidEscape: true }],
'comma-dangle': ['error', 'always-multiline'], // ensures clean diffs, see https://medium.com/@nikgraf/why-you-should-enforce-dangling-commas-for-multiline-statements-d034c98e36f8
'@stylistic/comma-dangle': ['error', 'always-multiline'], // ensures clean diffs, see https://medium.com/@nikgraf/why-you-should-enforce-dangling-commas-for-multiline-statements-d034c98e36f8
'comma-spacing': ['error', { before: false, after: true }], // space after, no space before
'no-multi-spaces': ['error', { ignoreEOLComments: false }], // no multi spaces
'array-bracket-spacing': ['error', 'never'], // [1, 2, 3]
Expand Down
5 changes: 3 additions & 2 deletions tools/@aws-cdk/pkglint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@
"@types/jest": "^29.5.14",
"@types/semver": "^7.5.8",
"@types/yargs": "^15.0.19",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^8",
"@stylistic/eslint-plugin": "^2",
"@typescript-eslint/parser": "^8",
"eslint": "^7.32.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-import-resolver-typescript": "^2.7.1",
Expand Down
13 changes: 6 additions & 7 deletions tools/@aws-cdk/yargs-gen/lib/yargs-gen.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { $E, Expression, ExternalModule, FreeFunction, IScope, Module, SelectiveModuleImport, Statement, ThingSymbol, Type, TypeScriptRenderer, code, expr } from '@cdklabs/typewriter';
import { EsLintRules } from '@cdklabs/typewriter/lib/eslint-rules';
import * as prettier from 'prettier';
import { CliConfig, CliOption, YargsOption } from './yargs-types';

Expand Down Expand Up @@ -47,12 +46,12 @@ export async function renderYargs(config: CliConfig, helpers: CliHelpers): Promi

const ts = new TypeScriptRenderer({
disabledEsLintRules: [
EsLintRules.COMMA_DANGLE,
EsLintRules.COMMA_SPACING,
EsLintRules.MAX_LEN,
EsLintRules.QUOTES,
EsLintRules.QUOTE_PROPS,
],
'@stylistic/comma-dangle',
'@stylistic/comma-spacing',
'@stylistic/max-len',
'@stylistic/quotes',
'@stylistic/quote-props',
] as any, // Force our string[] into EsLintRules[], it will work out at runtime
}).render(scope);

return prettier.format(ts, {
Expand Down
4 changes: 2 additions & 2 deletions tools/@aws-cdk/yargs-gen/test/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('render', () => {
// GENERATED FROM packages/aws-cdk/lib/config.ts.
// Do not edit by hand; all changes will be overwritten at build time from the config file.
// -------------------------------------------------------------------------------------------
/* eslint-disable @typescript-eslint/comma-dangle, comma-spacing, max-len, quotes, quote-props */
/* eslint-disable @stylistic/comma-dangle, comma-spacing, max-len, quotes, quote-props */
import { Argv } from 'yargs';
import * as helpers from './util/yargs-helpers';

Expand Down Expand Up @@ -92,7 +92,7 @@ describe('render', () => {
// GENERATED FROM packages/aws-cdk/lib/config.ts.
// Do not edit by hand; all changes will be overwritten at build time from the config file.
// -------------------------------------------------------------------------------------------
/* eslint-disable @typescript-eslint/comma-dangle, comma-spacing, max-len, quotes, quote-props */
/* eslint-disable @stylistic/comma-dangle, comma-spacing, max-len, quotes, quote-props */
import { Argv } from 'yargs';
import * as helpers from './util/yargs-helpers';

Expand Down
Loading
Loading