Skip to content

Commit e77d353

Browse files
authored
fix: add linting comments (#20304)
* fix: add linting comments * fix: disbled eslint errors * fix: removed ignores * fix: formatting * fix: build * fix: allowed prefer callback
1 parent e677f5f commit e77d353

File tree

353 files changed

+4881
-3465
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

353 files changed

+4881
-3465
lines changed

config/typescript-config-carbon/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export const loadTsCompilerOpts = (path: string) => {
2525
const { errors } = opts;
2626
if (errors.length > 0) {
2727
errors.forEach((diagnostic) => {
28+
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20071
2829
console.log(diagnosticToMessage(diagnostic));
2930
});
3031
throw new Error('Base TypeScript config file errors found');

eslint.config.mjs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default tseslint.config([
2727
// which implies that they were set previously.
2828
'no-console': 'error',
2929
'no-template-curly-in-string': 'error',
30-
'prefer-arrow-callback': 'error',
30+
'prefer-arrow-callback': ['error', { allowNamedFunctions: true }],
3131
'require-atomic-updates': 'error',
3232
},
3333
},
@@ -163,13 +163,6 @@ export default tseslint.config([
163163
'www/src/pages/insights/index.js',
164164
'www/src/pages/packages/\\[package\\]/index.js',
165165
'www/src/pages/packages/index.js',
166-
167-
// TODO:
168-
// 1. Delete this ignore.
169-
// 2. Delete `--no-warn-ignored` from the `lint` script in `package.json`.
170-
//
171-
// https://github.com/carbon-design-system/carbon/issues/18991
172-
'**/*.{ts,tsx}',
173166
],
174167
},
175168
]);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
"lint-staged": {
131131
"**/*.{cjs,js,jsx,mjs,ts,tsx}": [
132132
"yarn prettier --cache --write",
133-
"eslint --cache --fix --max-warnings 0 --no-warn-ignored"
133+
"eslint --cache --fix --max-warnings 0"
134134
],
135135
"**/*.scss": [
136136
"yarn prettier --cache --write",

packages/react/code-connect/AILabel/AILabel.figma.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
89
// @ts-nocheck
910
import React from 'react';
1011
import { AILabel } from '@carbon/react';

packages/react/code-connect/AILabel/AILabelActions.figma.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
89
// @ts-nocheck
910
import React from 'react';
1011
import { AILabelActions } from '@carbon/react';

packages/react/code-connect/AILabel/AILabelContent.figma.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
89
// @ts-nocheck
910
import React from 'react';
1011
import { AILabelContent } from '@carbon/react';

packages/react/code-connect/Button/Button.figma.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* This source code is licensed under the Apache-2.0 license found in the
55
* LICENSE file in the root directory of this source tree.
66
*/
7+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
78
// @ts-nocheck
89
import React from 'react';
910
import { Button, ButtonSkeleton } from '@carbon/react';

packages/react/code-connect/Checkbox/Checkbox.figma.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
89
// @ts-nocheck
910
import React from 'react';
1011
import { Checkbox, CheckboxSkeleton } from '@carbon/react';

packages/react/code-connect/CodeSnippet/CodeSnippet.figma.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* This source code is licensed under the Apache-2.0 license found in the
55
* LICENSE file in the root directory of this source tree.
66
*/
7+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
78
// @ts-nocheck
89
import React from 'react';
910
import { CodeSnippet, CodeSnippetSkeleton } from '@carbon/react';

packages/react/code-connect/ComboBox/ComboBox.figma.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- https://github.com/carbon-design-system/carbon/issues/20071
89
// @ts-nocheck
910
import React from 'react';
1011
import { ComboBox, DropdownSkeleton } from '@carbon/react';

0 commit comments

Comments
 (0)