Skip to content

Commit

Permalink
Merge pull request #76 from unexpectedjs/feature/prettier
Browse files Browse the repository at this point in the history
Add prettier setup, drop node.js 4 (Major)
  • Loading branch information
papandreou committed Dec 11, 2018
2 parents 4f8e58b + 68d6b6a commit 777ccf1
Show file tree
Hide file tree
Showing 11 changed files with 3,766 additions and 3,069 deletions.
5 changes: 1 addition & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ root = true
[*]
end_of_line = lf
insert_final_newline = true
indent_size = 4
indent_size = 2
indent_style = space

[Makefile]
indent_style = tab

[*.json]
indent_size = 2
10 changes: 5 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules
coverage
vendor
test/documentation.spec.js
site-build
/documentation/
/vendor/
/.nyc_output/
/coverage/
/site-build/
23 changes: 17 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
module.exports = {
extends: [
'onelint'
],
env: {
es6: false
const config = {
extends: ['pretty-standard'],
plugins: ['mocha'],
rules: {
'mocha/no-exclusive-tests': 'error',
'mocha/no-nested-tests': 'error',
'mocha/no-identical-title': 'error'
}
};

if (process.stdin.isTTY) {
// Enable plugin-prettier when running in a terminal. Allows us to have
// eslint verify prettier formatting, while not being bothered by it in our
// editors.
config.plugins.push('prettier');
config.rules['prettier/prettier'] = 'error';
}

module.exports = config;
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package.json
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
language: node_js
node_js:
- "4"
- "6"
- "7"
- "8"
script: "npm run-script travis"
- '6'
- '7'
- '8'
- '10'
- 'node'
script: 'npm run ci'
4 changes: 2 additions & 2 deletions bootstrap-unexpected-markdown.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*global unexpected:true, sinon, Promise:true*/
/*global unexpected:true, sinon:true, Promise:true*/
/* exported Promise, sinon */
unexpected = require('unexpected');
unexpected.output.preferredWidth = 80;
unexpected.installPlugin(require('./lib/unexpected-sinon'));
require('./test/monkeyPatchSinonStackFrames');
if (typeof Promise === 'undefined') {
Promise = require('rsvp').Promise;
Promise = require('rsvp').Promise;
}
sinon = require('sinon');

0 comments on commit 777ccf1

Please sign in to comment.