Skip to content

Commit 74d42d3

Browse files
bernardwangline47
andauthored
[NO_TICKET] Update backstop files and misc linting changes (#698)
* Move backstop reference files to packages/design-system-docs/__tests, and move other backstop files to tmp * Update reference files * Update lint script to include root Co-authored-by: Scott Weber <[email protected]>
1 parent 78ad470 commit 74d42d3

File tree

966 files changed

+94
-100
lines changed

Some content is hidden

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

966 files changed

+94
-100
lines changed

CODE_OF_CONDUCT.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
88

99
Examples of behavior that contributes to creating a positive environment include:
1010

11-
* Using welcoming and inclusive language
12-
* Being respectful of differing viewpoints and experiences
13-
* Gracefully accepting constructive criticism
14-
* Focusing on what is best for the community
15-
* Showing empathy towards other community members
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy towards other community members
1616

1717
Examples of unacceptable behavior by participants include:
1818

19-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20-
* Trolling, insulting/derogatory comments, and personal or political attacks
21-
* Public or private harassment
22-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23-
* Other conduct which could reasonably be considered inappropriate in a professional setting
19+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
- Trolling, insulting/derogatory comments, and personal or political attacks
21+
- Public or private harassment
22+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
- Other conduct which could reasonably be considered inappropriate in a professional setting
2424

2525
## Our Responsibilities
2626

CONTRIBUTING.md

+14-17
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@ Please take a look at our [Code of Conduct](CODE_OF_CONDUCT.md) to learn more.
99

1010
If you are interested in running this site locally, please take a look at [setting up your local development environment](/README.md#running-locally).
1111

12-
Use [our guides](https://github.com/CMSgov/design-system/tree/master/guides) to find additional information like:
13-
* Guiding principles
14-
* Coding guidelines
15-
* How to write documentation
12+
Use [our guides](https://github.com/CMSgov/design-system/tree/master/guides) to find additional information like:
13+
14+
- Guiding principles
15+
- Coding guidelines
16+
- How to write documentation
1617

1718
## Submitting a pull request
1819

19-
* [Fork the design system](https://guides.github.com/activities/forking/) into your GitHub account
20-
* [Create a branch](https://help.github.com/en/articles/creating-and-deleting-branches-within-your-repository) from `master` that defines what you’re working on (for example, fix-autocomplete-bug).
21-
* [Submit a pull request](https://help.github.com/en/articles/creating-a-pull-request) against the `master` branch
20+
- [Fork the design system](https://guides.github.com/activities/forking/) into your GitHub account
21+
- [Create a branch](https://help.github.com/en/articles/creating-and-deleting-branches-within-your-repository) from `master` that defines what you’re working on (for example, fix-autocomplete-bug).
22+
- [Submit a pull request](https://help.github.com/en/articles/creating-a-pull-request) against the `master` branch
2223

2324
**Note:** more information on the [GitHub flow](https://guides.github.com/introduction/flow/)
2425

@@ -47,7 +48,6 @@ Open a new [GitHub issue](https://github.com/CMSgov/design-system/issues/new?ass
4748
- Can this serve more than one use case and be reusable in multiple scenarios? Please explain.
4849
- Please include links to any examples, research or code to support your proposal, if available.
4950

50-
5151
### Step 2 - Review (Core design system team)
5252

5353
After an idea is proposed, it undergoes an evaluation by a team member. This review is to determine whether the contribution needs small fixes, visual improvements, or whether to reject it.
@@ -56,14 +56,13 @@ During this stage, the team will review supporting research — and link this re
5656

5757
Revisions may be requested before moving the proposal to Draft. If the proposal is good to go as is, it's moved to Draft. If the proposal doesn’t pass the evaluation, the reviewer will reject it and close the issue.
5858

59-
6059
The criteria used in evaluating is:
6160

62-
- **Usability**: Is the pattern responsive? Is the interaction flow clearly documented?
61+
- **Usability**: Is the pattern responsive? Is the interaction flow clearly documented?
6362
- **Accessibility**: Is the pattern 508 compliant and accessible?
6463
- **Visual design**: Is the pattern consistent with the CMS Design system visual style?
6564

66-
The pattern will be marked as *Draft* when it passes evaluation criteria.
65+
The pattern will be marked as _Draft_ when it passes evaluation criteria.
6766

6867
### Step 3 - Draft (Core design system team)
6968

@@ -76,14 +75,11 @@ Acceptance criteria:
7675
- Pattern validates against accessibility criteria
7776
- Feedback has been collected on the pattern based on usage in real-world products and revised if necessary
7877

79-
80-
Finally, a team member will either move the pattern to *Ready*; ask for revisions; or, in some cases, reject the pattern.
81-
78+
Finally, a team member will either move the pattern to _Ready_; ask for revisions; or, in some cases, reject the pattern.
8279

8380
### Step 4 - Ready
8481

85-
When a pattern is moved to *Ready*, all criteria from the Draft step have been completed. The pattern is now a stable part of the design system in production and the core team will conduct ongoing maintenance (bug fixes, minor enhancements, and so on).
86-
82+
When a pattern is moved to _Ready_, all criteria from the Draft step have been completed. The pattern is now a stable part of the design system in production and the core team will conduct ongoing maintenance (bug fixes, minor enhancements, and so on).
8783

8884
## Amending patterns
8985

@@ -95,7 +91,7 @@ Amendment proposals should follow the same process as outlined above. During the
9591

9692
As technology changes, certain UI patterns will become less relevant or may be replaced by better patterns. As we become aware of such changes, we’ll remove patterns from the library. To avoid pulling the rug out from under people relying on those patterns in their projects, deprecated patterns will remain within the codebase for at least a month after deprecation. The patterns will also be marked as deprecated in the documentation and in the developer's console when used in a project.
9793

98-
----
94+
---
9995

10096
## Licenses and attribution
10197

@@ -104,6 +100,7 @@ A few parts of this project are not in the public domain. Attribution and licens
104100
The rest of this project is in the worldwide public domain, released under the [CC0 1.0 Universal public domain dedication](https://creativecommons.org/publicdomain/zero/1.0/).
105101

106102
## Contributions
103+
107104
All contributions to this project will be released under the CC0 dedication alongside the public domain portions of this project. For more information, see [CONTRIBUTING.md](CONTRIBUTING.md).
108105

109106
**Credits**

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ Unless expressly stated otherwise, the person who associated a work with this de
5959

6060
### Contributions to this project
6161

62-
As stated in [CONTRIBUTING](CONTRIBUTING.md), all contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.
62+
As stated in [CONTRIBUTING](CONTRIBUTING.md), all contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

backstop.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1401,11 +1401,11 @@
14011401
}
14021402
],
14031403
"paths": {
1404-
"bitmaps_reference": "tools/backstop_data/bitmaps_reference",
1405-
"bitmaps_test": "tools/backstop_data/bitmaps_test",
1406-
"engine_scripts": "tools/backstop_data/engine_scripts",
1407-
"html_report": "tools/backstop_data/html_report",
1408-
"ci_report": "tools/backstop_data/ci_report"
1404+
"bitmaps_reference": "packages/design-system-docs/src/__tests__/backstop_reference",
1405+
"bitmaps_test": "tmp/backstop_data/bitmaps_test",
1406+
"engine_scripts": "tmp/backstop_data/engine_scripts",
1407+
"html_report": "tmp/backstop_data/html_report",
1408+
"ci_report": "tmp/backstop_data/ci_report"
14091409
},
14101410
"report": ["browser"],
14111411
"engine": "puppet",

examples/form/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ <h2 class="ds-c-alert__heading">1 error with your application</h2>
9898
</form>
9999
</div>
100100
<script>
101-
document.querySelector('form').addEventListener('submit', function(event) {
101+
document.querySelector('form').addEventListener('submit', function (event) {
102102
event.preventDefault();
103103
document.querySelector('#spinner').classList.toggle('ds-u-display--none');
104104
});

examples/react-app/Gulpfile.js

+5-8
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,28 @@ const sass = require('gulp-sass');
66
* We could do this manually, but why not automate it so it's easy to do
77
* as things are updated :)
88
*/
9-
gulp.task('copy-design-system', function() {
9+
gulp.task('copy-design-system', function () {
1010
return gulp
1111
.src([
1212
'node_modules/@cmsgov/design-system-core/**/fonts/*',
13-
'node_modules/@cmsgov/design-system-core/**/images/*'
13+
'node_modules/@cmsgov/design-system-core/**/images/*',
1414
])
1515
.pipe(gulp.dest('./dist'));
1616
});
1717

1818
/**
1919
* Transpile Sass to CSS
2020
*/
21-
gulp.task('sass', function() {
21+
gulp.task('sass', function () {
2222
const transpiler = sass({
2323
// Add node_modules to the list of paths used to resolve @import
2424
// declarations. This way it's easier to import our design system's
2525
// Sass files.
2626
includePaths: ['node_modules'],
27-
outputStyle: 'compressed'
27+
outputStyle: 'compressed',
2828
}).on('error', sass.logError);
2929

30-
return gulp
31-
.src('./src/styles/**/*.scss')
32-
.pipe(transpiler)
33-
.pipe(gulp.dest('./dist/styles'));
30+
return gulp.src('./src/styles/**/*.scss').pipe(transpiler).pipe(gulp.dest('./dist/styles'));
3431
});
3532

3633
gulp.task('default', ['copy-design-system', 'sass']);

examples/react-app/src/scripts/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Button from '@cmsgov/design-system-core/dist/components/Button/Button';
66
import React from 'react';
77
import ReactDOM from 'react-dom';
88

9-
const Example = function() {
9+
const Example = function () {
1010
return (
1111
<div>
1212
<Alert heading="Hello world">

examples/react-app/webpack.config.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const config = {
77
entry: './src/scripts/index.js',
88
output: {
99
filename: 'bundle.js',
10-
path: path.resolve(__dirname, 'dist/scripts')
10+
path: path.resolve(__dirname, 'dist/scripts'),
1111
},
1212
module: {
1313
rules: [
@@ -18,13 +18,13 @@ const config = {
1818
{
1919
loader: 'babel-loader',
2020
options: {
21-
presets: ['es2015', 'react']
22-
}
23-
}
24-
]
25-
}
26-
]
27-
}
21+
presets: ['es2015', 'react'],
22+
},
23+
},
24+
],
25+
},
26+
],
27+
},
2828
};
2929

3030
module.exports = config;

examples/webpack-demo/p_webpack.config.js

+21-21
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,30 @@ module.exports = {
44
entry: './src/index.js',
55
output: {
66
filename: 'main.js',
7-
path: path.resolve(__dirname, 'dist')
7+
path: path.resolve(__dirname, 'dist'),
88
},
99
module: {
1010
rules: [
1111
{
1212
test: /\.scss$/,
1313
use: [
1414
{
15-
loader: 'style-loader' // creates style nodes from JS strings
15+
loader: 'style-loader', // creates style nodes from JS strings
1616
},
1717
{
18-
loader: 'css-loader' // translates CSS into CommonJS
18+
loader: 'css-loader', // translates CSS into CommonJS
1919
},
2020
{
2121
loader: 'sass-loader', // compiles Sass to CSS, using Node Sass by default
2222
options: {
2323
includePaths: [
2424
path.resolve(__dirname, './src/scss'),
25-
path.resolve(__dirname, './node_modules')
25+
path.resolve(__dirname, './node_modules'),
2626
// console.log(__dirname + '/node_modules')
27-
]
28-
}
29-
}
30-
]
27+
],
28+
},
29+
},
30+
],
3131
},
3232
{
3333
test: /\.(png|svg|jpg|gif)$/,
@@ -37,11 +37,11 @@ module.exports = {
3737
options: {
3838
includePaths: [
3939
path.resolve(__dirname, './src/img'),
40-
path.resolve(__dirname, './node_modules')
41-
]
42-
}
43-
}
44-
]
40+
path.resolve(__dirname, './node_modules'),
41+
],
42+
},
43+
},
44+
],
4545
},
4646
{
4747
test: /\.(woff|woff2|eot|ttf|otf)$/,
@@ -51,12 +51,12 @@ module.exports = {
5151
options: {
5252
includePaths: [
5353
path.resolve(__dirname, './src/fonts'),
54-
path.resolve(__dirname, './node_modules')
55-
]
56-
}
57-
}
58-
]
59-
}
60-
]
61-
}
54+
path.resolve(__dirname, './node_modules'),
55+
],
56+
},
57+
},
58+
],
59+
},
60+
],
61+
},
6262
};

0 commit comments

Comments
 (0)