mirror of
https://github.com/material-components/material-web.git
synced 2026-01-09 07:21:09 +08:00
chore: add commitlint config for scopes
PiperOrigin-RevId: 591061701
This commit is contained in:
parent
4095c06e5a
commit
b0eea7f59d
6
.github/workflows/commitlint.yml
vendored
6
.github/workflows/commitlint.yml
vendored
@ -7,11 +7,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: npm
|
||||
|
||||
- run: npm install -g commitlint @commitlint/config-conventional
|
||||
- run: 'echo "${PR_TITLE}" | commitlint -x @commitlint/config-conventional'
|
||||
- run: npm install -g @commitlint/cli @commitlint/config-conventional
|
||||
- run: 'echo "${PR_TITLE}" | commitlint'
|
||||
env:
|
||||
PR_TITLE: ${{ github.event.pull_request.title }}
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,6 +2,7 @@ node_modules
|
||||
*.js
|
||||
!web-test-runner.config.js
|
||||
!css-to-ts.js
|
||||
!commitlint.config.js
|
||||
*.css
|
||||
*.css.ts
|
||||
*.map
|
||||
@ -25,4 +26,4 @@ catalog/site/about/images
|
||||
catalog/*.tsbuildinfo
|
||||
catalog/stories/*/
|
||||
!catalog/stories/components/
|
||||
!catalog/src/types/**/*.d.ts
|
||||
!catalog/src/types/**/*.d.ts
|
||||
|
||||
45
commitlint.config.js
Normal file
45
commitlint.config.js
Normal file
@ -0,0 +1,45 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2023 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
export default {
|
||||
extends: ['@commitlint/config-conventional'],
|
||||
rules: {
|
||||
'scope-enum': [
|
||||
2,
|
||||
'always',
|
||||
[
|
||||
// Use "/" for multiple scopes: `fix(button/checkbox): subject"`
|
||||
// Omit scope for broad "all" changes.
|
||||
'button',
|
||||
'catalog',
|
||||
'checkbox',
|
||||
'chips',
|
||||
'color',
|
||||
'dialog',
|
||||
'divider',
|
||||
'elevation',
|
||||
'fab',
|
||||
'field',
|
||||
'focus',
|
||||
'icon',
|
||||
'iconbutton',
|
||||
'labs',
|
||||
'list',
|
||||
'menu',
|
||||
'progress',
|
||||
'radio',
|
||||
'ripple',
|
||||
'select',
|
||||
'slider',
|
||||
'switch',
|
||||
'tabs',
|
||||
'textfield',
|
||||
'tokens',
|
||||
'typography',
|
||||
],
|
||||
],
|
||||
},
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user