Skip to content

Commit c85b3ba

Browse files
authored
Merge pull request #254 from zillow/2x
v2.0.0
2 parents b40e59d + 878d382 commit c85b3ba

18 files changed

+5148
-2991
lines changed

.eslintignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/coverage
2-
/es
3-
/lib
2+
/dist
43
/styleguide
54
jest.config.js
65
styleguide.config.js

.eslintrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"extends": ["plugin:zillow/recommended", "plugin:zillow/jest"],
3-
"env": {
4-
"browser": true
5-
}
2+
"extends": ["plugin:zillow/recommended", "plugin:zillow/jest"],
3+
"env": {
4+
"browser": true
5+
}
66
}

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/coverage
2-
/es
3-
/lib
2+
/dist
43
/styleguide
54
node_modules
65
.idea

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no -- commitlint --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run eslint && npm run test

.versionrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ module.exports = {
1313
{ type: 'refactor', section: 'Code Refactoring' },
1414
{ type: 'test', section: 'Tests' },
1515
{ type: 'build', section: 'Build System' },
16-
{ type: 'ci', section: 'Continuous Integration' }
17-
]
16+
{ type: 'ci', section: 'Continuous Integration' },
17+
],
1818
};

babel.config.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
// eslint-disable-next-line zillow/import/no-extraneous-dependencies
2+
const { babelConfig } = require('create-react-styleguide');
3+
4+
if (process.env.DEBUG) {
5+
// eslint-disable-next-line no-console
6+
console.log('baseConfig object:', JSON.stringify(babelConfig, null, 4));
7+
}
8+
19
module.exports = {
2-
presets: [['zillow', { modules: false }]],
3-
env: {
4-
cjs: {
5-
presets: ['zillow'],
6-
},
7-
test: {
8-
presets: ['zillow'],
9-
},
10-
},
10+
...babelConfig,
1111
};

commitlint.config.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
4+
rules: {
5+
'body-case': [0],
6+
'subject-case': [0],
7+
'header-max-length': [0],
8+
'type-enum': [
9+
2,
10+
'always',
11+
[
12+
// Conventional Commit types
13+
'feat',
14+
'feature',
15+
'fix',
16+
'perf',
17+
'revert',
18+
'docs',
19+
'style',
20+
'chore',
21+
'refactor',
22+
'test',
23+
'build',
24+
'ci',
25+
// react-slider specific types
26+
'a11y',
27+
'deprecate',
28+
],
29+
],
30+
},
31+
};

jest.config.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
const { createJestConfig } = require('create-react-styleguide');
1+
// eslint-disable-next-line zillow/import/no-extraneous-dependencies
2+
const { jestConfig } = require('create-react-styleguide');
23

3-
module.exports = createJestConfig({
4-
/* your own config shallowly merged */
5-
setupFilesAfterEnv: ['jest-styled-components'],
6-
});
4+
if (process.env.DEBUG) {
5+
// eslint-disable-next-line no-console
6+
console.log('jestConfig object:', JSON.stringify(jestConfig, null, 4));
7+
}
8+
9+
module.exports = {
10+
...jestConfig,
11+
};

0 commit comments

Comments
 (0)