Skip to content

Commit

Permalink
Merge pull request #254 from zillow/2x
Browse files Browse the repository at this point in the history
v2.0.0
  • Loading branch information
kris-ellery authored Mar 29, 2022
2 parents b40e59d + 878d382 commit c85b3ba
Show file tree
Hide file tree
Showing 18 changed files with 5,148 additions and 2,991 deletions.
3 changes: 1 addition & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/coverage
/es
/lib
/dist
/styleguide
jest.config.js
styleguide.config.js
8 changes: 4 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": ["plugin:zillow/recommended", "plugin:zillow/jest"],
"env": {
"browser": true
}
"extends": ["plugin:zillow/recommended", "plugin:zillow/jest"],
"env": {
"browser": true
}
}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/coverage
/es
/lib
/dist
/styleguide
node_modules
.idea
Expand Down
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run eslint && npm run test
4 changes: 2 additions & 2 deletions .versionrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ module.exports = {
{ type: 'refactor', section: 'Code Refactoring' },
{ type: 'test', section: 'Tests' },
{ type: 'build', section: 'Build System' },
{ type: 'ci', section: 'Continuous Integration' }
]
{ type: 'ci', section: 'Continuous Integration' },
],
};
18 changes: 9 additions & 9 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// eslint-disable-next-line zillow/import/no-extraneous-dependencies
const { babelConfig } = require('create-react-styleguide');

if (process.env.DEBUG) {
// eslint-disable-next-line no-console
console.log('baseConfig object:', JSON.stringify(babelConfig, null, 4));
}

module.exports = {
presets: [['zillow', { modules: false }]],
env: {
cjs: {
presets: ['zillow'],
},
test: {
presets: ['zillow'],
},
},
...babelConfig,
};
31 changes: 31 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
extends: ['@commitlint/config-conventional'],

rules: {
'body-case': [0],
'subject-case': [0],
'header-max-length': [0],
'type-enum': [
2,
'always',
[
// Conventional Commit types
'feat',
'feature',
'fix',
'perf',
'revert',
'docs',
'style',
'chore',
'refactor',
'test',
'build',
'ci',
// react-slider specific types
'a11y',
'deprecate',
],
],
},
};
15 changes: 10 additions & 5 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
const { createJestConfig } = require('create-react-styleguide');
// eslint-disable-next-line zillow/import/no-extraneous-dependencies
const { jestConfig } = require('create-react-styleguide');

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

module.exports = {
...jestConfig,
};
Loading

0 comments on commit c85b3ba

Please sign in to comment.