Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
makafsal committed Nov 25, 2024
2 parents cf72a26 + 473af0f commit 7d8f719
Show file tree
Hide file tree
Showing 118 changed files with 1,134 additions and 2,407 deletions.
25 changes: 25 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'header-max-length': [2, 'always', 72],
'body-max-line-length': [2, 'always', 80],
'scope-case': [0, 'always', 'lower-case'],
'type-enum': [
2,
'always',
[
'build',
'ci',
'chore',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
],
],
},
};
60 changes: 60 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
module.exports = {
parser: '@babel/eslint-parser',
parserOptions: {
babelOptions: {
presets: ['@babel/preset-react'],
},
},
plugins: ['ssr-friendly'],
ignorePatterns: ['packages/ibm-products-web-components/**/*'],
extends: ['carbon', 'plugin:ssr-friendly/recommended'],
rules: {
'react/display-name': [0],
'react/forbid-component-props': [
2,
{
forbid: [
{
propName: 'style',
disallowedFor: ['Datagrid', 'Carousel', 'Checklist', 'Coachmark'],
message: 'Avoid using style prop',
},
],
},
],
'react/forbid-dom-props': [
2,
{
forbid: [
{
propName: 'style',
disallowedFor: ['Datagrid', 'Carousel', 'Checklist', 'Coachmark'],
message: 'Avoid using style prop',
},
],
},
],
},
overrides: [
{
files: ['*.ts', '*.tsx'],
plugins: ['@typescript-eslint'],
extends: ['plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'after-used',
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
},
},
],
};
7 changes: 6 additions & 1 deletion .percy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@ snapshot:
- 360
- 1366
minHeight: 1024
discovery:
network_idle_timeout: 500
storybook:
include: ['/IBM Products/']
exclude: [
'/Datagrid/*',
'/DataSpreadsheet/',
'Cascade: With Grid',
'Cascade: Without Grid',
# to be fixed
'/MultiAddSelect: With Avatars/', # avoid dynamic avatar color generation
'/Tag set/TagSet: Hundreds Of Tags', # avoid dynamic tag color generation
'/Page header/PageHeader: Page header with all items, pre-collapsed', # takes random time, to collapse on initial load
'/Page header/PageHeader: Page header with all items, pre-collapsed', # takes random time, to collapse on initial load.
'/Tag set/TagSet: Many Tags', # takes time to calculate the overflow, causing random layout shift
]
10 changes: 7 additions & 3 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
module.exports = {
root: true,
extends: ['stylelint-config-ibm-products'],
extends: ['stylelint-config-carbon'],
rules: {
'import-notation': 'string',
'max-nesting-depth': null,
'scss/no-global-function-names': null,
'csstools/use-logical': null,
'scss/load-no-partial-leading-underscore': null,
'scss/double-slash-comment-inline': null,
'no-duplicate-selectors': null,
},
};
4 changes: 0 additions & 4 deletions config/cli/.npmignore

This file was deleted.

Loading

0 comments on commit 7d8f719

Please sign in to comment.