Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(htmlhint) feature/add commitizen package, husky and prettier #287

Merged
merged 5 commits into from
Sep 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/lib

# npm
package-lock.json
npm-debug.log*
3 changes: 3 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
Shinigami92 marked this conversation as resolved.
Show resolved Hide resolved
"singleQuote": true
}
38 changes: 19 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
language: node_js
cache:
directories:
- node_modules
- ~/.npm
directories:
- node_modules
- ~/.npm
notifications:
email:
recipients:
- [email protected]
email:
recipients:
- [email protected]
node_js:
- '10'
- '9'
- '8'
- '6'
- '10'
- '9'
- '8'
- '6'
install:
- npm install
- npm install -g codecov
- npm install -g codecov
- npm install
script:
- "grunt"
- 'grunt'
- istanbul cover ./node_modules/mocha/bin/_mocha --reporter test -- -R spec
- codecov
branches:
only:
- master
- develop
- /^greenkeeper/.*$/
except:
- /^v\d+\.\d+\.\d+$/
only:
- master
- develop
- /^greenkeeper/.*$/
except:
- /^v\d+\.\d+\.\d+$/
File renamed without changes.
49 changes: 49 additions & 0 deletions commitizen.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/* eslint-env node */
const types = [
{
value: 'feat',
name: 'feat: A new feature'
},
{
value: 'fix',
name: 'fix: A bug fix'
},
{
value: 'docs',
name: 'docs: Documentation only changes'
},
{
value: 'style',
name: `style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)`
},
{
value: 'refactor',
name:
'refactor: A code change that neither fixes a bug nor adds a feature'
},
{
value: 'perf',
name: 'perf: A code change that improves performance'
},
{
value: 'test',
name: 'test: Adding missing tests'
},
{
value: 'chore',
name: `chore: Changes to the build process or auxiliary tools and libraries such as documentation generation`
},
{
value: 'revert',
name: 'revert: Revert to a commit'
}
];

const scopes = ['core', 'cli', 'htmlhint'].map(name => ({ name }));

module.exports = {
types,
scopes,
allowCustomScopes: true,
allowBreakingChanges: ['feat', 'fix', 'perf', 'refactor']
};
18 changes: 18 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* eslint-env node */
const { types, scopes, allowCustomScopes } = require('./commitizen.config');

const validTypes = types.map(type => type.value);
const validScopes = scopes.map(scope => scope.name);
const scopeValidationLevel = allowCustomScopes ? 1 : 2;

module.exports = {
extends: ['@commitlint/config-conventional'],
parserPreset: './parser-preset',

// Add your own rules. See http://marionebl.github.io/commitlint
rules: {
// Apply valid scopes and types
'scope-enum': [scopeValidationLevel, 'always', validScopes],
'type-enum': [2, 'always', validTypes]
}
};
Loading