-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove lint configs from package and move into own files
- Loading branch information
1 parent
711eb72
commit ab3838b
Showing
4 changed files
with
92 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
], | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,133 +123,6 @@ | |
"ws": "^8.17.1", | ||
"@carbon/ibm-products-styles": "^2.49.0" | ||
}, | ||
"eslintConfig": { | ||
"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" | ||
} | ||
} | ||
] | ||
}, | ||
"commitlint": { | ||
"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" | ||
] | ||
] | ||
} | ||
}, | ||
"lint-staged": { | ||
"!(examples/**/*)**/*.{js,jsx,ts,tsx}": [ | ||
"npx prettier --cache --write", | ||
|
@@ -270,18 +143,5 @@ | |
"dependencies": { | ||
"stylelint-plugin-carbon-tokens": "2.8.0" | ||
}, | ||
"stylelint": { | ||
"extends": [ | ||
"stylelint-config-carbon" | ||
], | ||
"rules": { | ||
"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 | ||
} | ||
}, | ||
"packageManager": "[email protected]" | ||
} |