Skip to content

Commit

Permalink
Merge branch 'main' into conditionBuilder6422
Browse files Browse the repository at this point in the history
  • Loading branch information
amal-k-joy authored Feb 4, 2025
2 parents ae2613a + d0b1481 commit 5f2ac89
Show file tree
Hide file tree
Showing 49 changed files with 1,456 additions and 453 deletions.
34 changes: 0 additions & 34 deletions .eslintignore

This file was deleted.

60 changes: 0 additions & 60 deletions .eslintrc.js

This file was deleted.

137 changes: 137 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
/**
* Copyright IBM Corp. 2025, 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import globals from 'globals';
import { fixupPluginRules } from '@eslint/compat';
import { FlatCompat } from '@eslint/eslintrc'
import eslint from '@eslint/js';
import react from 'eslint-plugin-react';
import pluginSsrFriendly from 'eslint-plugin-ssr-friendly';
import tsEslint from 'typescript-eslint';

import path from 'node:path'
import { fileURLToPath } from 'node:url'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: eslint.configs.recommended,
allConfig: eslint.configs.all,
});

export default tsEslint.config(
...compat.extends('eslint-config-carbon').map(c => {
if (c.plugins?.['@typescript-eslint']) {
return {};
}
return c;
}),
eslint.configs.recommended,
tsEslint.configs.recommended,
react.configs.flat.recommended,
{
files: ['**/*.{js,mjs,cjs,jsx}'],
languageOptions: {
parser: {
meta: {
name: 'Ignore Without Parsing',
},

// Ignore Parsing error
parse: function () {
return {
type: 'Program',
loc: {},
comments: [],
range: [0, 0],
body: [],
tokens: [],
};
},
},
parserOptions: {
sourceType: 'script'
}
},
rules: {
'no-duplicate-imports': 'error',
},
},
{
ignores: [
'build',
'packages/*/build',
'packages/*/lib/*',
'packages/*/es/*',
'packages/*/examples/*/build',
'es',
'lib',
'dist',
'umd',
'examples',
'node_modules',
'packages/*/examples/*',
'**/node_modules/**',
'**/storybook-static/**',
'*.stories.*',
'**/coverage/**',
'packages/ibm-products/scripts/generate/templates/**/*.js*',
'scripts/example-gallery-builder/update-example/**/*.js*',
],
},
{
plugins: {
'ssr-friendly': fixupPluginRules(pluginSsrFriendly),
},
languageOptions: {
globals: {
...globals.browser,
...globals.node,
...globals.jest
}
},
settings: {
react: {
version: 'detect',
},
},
rules: {
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-unused-expressions': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-empty-object-type': 2,
'react/display-name': 0,
'react-hooks/exhaustive-deps': 2,
'jsx-a11y/no-noninteractive-tabindex': 1,
'jsx-a11y/no-static-element-interactions': 1,
'jsx-a11y/click-events-have-key-events': 1,
'jsdoc/check-tag-names': ['error', { definedTags: [ 'element', 'slot', 'csspart' ] }],
'ssr-friendly/no-dom-globals-in-module-scope': 2,
'react/prop-types': 2,
'react/forbid-dom-props': [
2,
{
'forbid': [
{
'propName': 'style',
'disallowedFor': [
'Datagrid',
'Carousel',
'Checklist',
'Coachmark'
],
'message': 'Avoid using style prop'
}
]
}
]
},
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ $preview-block-class: exp--tearsheet-create-multi-step;
.#{$preview-block-class}__description {
@include type-style('body-short-01');

padding-bottom: $spacing-04;
padding-block-end: $spacing-04;
}

p.#{$preview-block-class}__description:last-of-type {
padding-bottom: $spacing-07;
padding-block-end: $spacing-07;
}

.#{$preview-block-class}__heading {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
padding: 0;
margin-top: 3rem;
overflow-y: auto;
@supports (overflow-block: auto) {
overflow-block: auto;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@use '@carbon/react/scss/theme' as *;

.container {
padding-top: 50px;
padding-block-start: 50px;
}

.graph {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
.main--content .example-terminal p {
@include type-style('body-short-01');

padding-bottom: $spacing-07;
padding-block-end: $spacing-07;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ $block-class: 'gallery';

body {
overflow-x: hidden;

@supports (overflow-inline: hidden) {
overflow-inline: hidden;
}
}

.#{$block-class}.#{$block-class} {
Expand Down
17 changes: 12 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,29 @@
"@babel/preset-react": "^7.17.12",
"@commitlint/cli": "^18.6.0",
"@commitlint/config-conventional": "^18.6.0",
"@eslint/compat": "^1.2.5",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.19.0",
"@playwright/test": "^1.49.1",
"@testing-library/dom": "^8.11.4",
"@testing-library/react": "^14.0.0",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^14.4.3",
"@types/carbon__layout": "^0.0.3",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^8.22.0",
"accessibility-checker": "^3.1.78",
"cheerio": "^1.0.0-rc.12",
"commander": "^12.0.0",
"copyfiles": "^2.4.1",
"cspell": "^8.3.2",
"eslint": "^8.56.0",
"eslint-config-carbon": "3.17.1",
"eslint": "^9.19.0",
"eslint-config-carbon": "^3.19.0",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-ssr-friendly": "^1.3.0",
"gitignore-to-glob": "^0.3.0",
"globals": "^15.14.0",
"globby": "^14.0.0",
"husky": "^9.0.5",
"jest": "^29.7.0",
Expand All @@ -112,6 +118,7 @@
"stylelint": "^16.10.0",
"stylelint-config-carbon": "^1.20.0",
"stylelint-use-logical": "^2.1.2",
"typescript-eslint": "^8.22.0",
"webpack": "^5.96.1"
},
"//resolutions:http-signature": "package 'request' deprecated but still used, asks for http-signature ~1.2.0 which indirectly has vulnerabilities",
Expand All @@ -126,7 +133,7 @@
"ws": "^8.17.1"
},
"lint-staged": {
"!(examples/**/*)**/*.{js,jsx,ts,tsx}": [
"!(examples/**/*)**/*.{js,jsx,ts,tsx,mjs}": [
"npx prettier --cache --write",
"npx eslint --fix",
"npx cspell --no-must-find-files",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ $tearsheet-class: #{$pkg-prefix}--tearsheet;
flex-grow: 1;
overflow-x: auto;

@supports (overflow-inline: auto) {
overflow-inline: auto;
}

.#{$block-class}__selections-form-control-label-wrapper {
margin-inline-start: $spacing-03;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
.#{c4p-settings.$pkg-prefix}--combo-button__action {
display: block;
overflow-x: hidden;
@supports (overflow-inline: hidden) {
overflow-inline: hidden;
}

text-overflow: ellipsis;
white-space: nowrap;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ $step-block-class: #{c4p-settings.$pkg-prefix}--create-full-page__step;
grid-column: 1 / -1;
grid-row: 1 / -1;
overflow-y: auto;
@supports (overflow-block: auto) {
overflow-block: auto;
}
}

.#{$block-class} .#{$block-class}__body {
Expand All @@ -104,6 +107,10 @@ $step-block-class: #{c4p-settings.$pkg-prefix}--create-full-page__step;
background-color: $background;
color: $text-primary;
overflow-x: hidden;
@supports (overflow-inline: hidden) {
overflow-inline: hidden;
}

padding-block-start: $spacing-06;
}

Expand All @@ -123,6 +130,10 @@ $step-block-class: #{c4p-settings.$pkg-prefix}--create-full-page__step;
grid-row: 1;
inset-block-start: 0;
overflow-x: auto;
@supports (overflow-inline: auto) {
overflow-inline: auto;
}

padding-block-start: 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ $influencerAnimationStart: calc(-1 * #{$spacing-05});
grid-column: 1 / -1;
grid-row: 1 / -1;
overflow-y: auto;
@supports (overflow-block: auto) {
overflow-block: auto;
}
}

.#{$influencer-block-class}__title {
Expand Down
Loading

0 comments on commit 5f2ac89

Please sign in to comment.