Skip to content

Commit

Permalink
Use prettier@2
Browse files Browse the repository at this point in the history
And format the files
  • Loading branch information
mroderick committed Jan 26, 2021
1 parent 3bb0c5b commit f7ab6ec
Show file tree
Hide file tree
Showing 8 changed files with 147 additions and 156 deletions.
178 changes: 95 additions & 83 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,98 +1,110 @@
version: 2.1

references:
x-workdir: &work-dir
working_directory: ~/source
x-workdir: &work-dir
working_directory: ~/source

x-save-workspace: &persist-step
persist_to_workspace:
root: ~/source
paths:
- .
x-save-workspace: &persist-step
persist_to_workspace:
root: ~/source
paths:
- .

x-attach: &attach-step
attach_workspace:
at: .
x-attach: &attach-step
attach_workspace:
at: .

jobs:
install-dependencies:
<<: *work-dir
docker:
- image: circleci/node:10
environment:
HUSKY_SKIP_INSTALL: 1
steps:
- checkout
- restore_cache:
keys:
- v1-npm-{{ checksum "package-lock.json" }}
- run:
name: Install dependencies
command: |
if [ ! -d node_modules ]; then
npm ci
fi
- save_cache:
key: v1-npm-{{ checksum "package-lock.json" }}
paths:
- node_modules
- *persist-step
install-dependencies:
<<: *work-dir
docker:
- image: circleci/node:10
environment:
HUSKY_SKIP_INSTALL: 1
steps:
- checkout
- restore_cache:
keys:
- v1-npm-{{ checksum "package-lock.json" }}
- run:
name: Install dependencies
command: |
if [ ! -d node_modules ]; then
npm ci
fi
- save_cache:
key: v1-npm-{{ checksum "package-lock.json" }}
paths:
- node_modules
- *persist-step

lint:
<<: *work-dir
docker:
- image: node
steps:
- *attach-step
- run:
name: lint
command: npm run lint
lint:
<<: *work-dir
docker:
- image: node
steps:
- *attach-step
- run:
name: lint
command: npm run lint

node-10:
docker:
- image: circleci/node:10
steps:
- *attach-step
- run:
name: Test
command: npm test
prettier:
<<: *work-dir
docker:
- image: node
steps:
- *attach-step
- run:
name: prettier
command: npm run prettier:check

node-12:
docker:
- image: circleci/node:12
steps:
- *attach-step
- run:
name: Test with coverage
command: npm run test:coverage
- run:
name: Upload coverage report
command: bash <(curl -s https://codecov.io/bash) -F unit -s coverage/lcov.info
node-10:
docker:
- image: circleci/node:10
steps:
- *attach-step
- run:
name: Test
command: npm test

node-14:
docker:
- image: circleci/node:14
steps:
- *attach-step
- run:
name: Test
command: npm test
node-12:
docker:
- image: circleci/node:12
steps:
- *attach-step
- run:
name: Test with coverage
command: npm run test:coverage
- run:
name: Upload coverage report
command: bash <(curl -s https://codecov.io/bash) -F unit -s coverage/lcov.info

node-14:
docker:
- image: circleci/node:14
steps:
- *attach-step
- run:
name: Test
command: npm test

workflows:
version: 2
nise:
jobs:
- install-dependencies
- lint:
requires:
- install-dependencies
- node-10:
requires:
- install-dependencies
- node-12:
requires:
- install-dependencies
- node-14:
requires:
version: 2
nise:
jobs:
- install-dependencies
- lint:
requires:
- install-dependencies
- prettier:
requires:
- install-dependencies
- node-10:
requires:
- install-dependencies
- node-12:
requires:
- install-dependencies
- node-14:
requires:
- install-dependencies
40 changes: 20 additions & 20 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
extends: eslint-config-sinon

globals:
ArrayBuffer: false
Uint8Array: false
ArrayBuffer: false
Uint8Array: false

plugins:
- ie11
- ie11

rules:
ie11/no-collection-args: error
ie11/no-for-in-const: error
ie11/no-loop-func: warn
ie11/no-weak-collections: error
ie11/no-collection-args: error
ie11/no-for-in-const: error
ie11/no-loop-func: warn
ie11/no-weak-collections: error
prettier/prettier: off

overrides:
-
files: '*.test.*'
env:
mocha: true
- files: "*.test.*"
env:
mocha: true

plugins:
- mocha
plugins:
- mocha

rules:
mocha/no-exclusive-tests: error
mocha/no-identical-title: error
mocha/no-nested-tests: error
mocha/no-sibling-hooks: error
mocha/no-top-level-hooks: error
max-nested-callbacks: off
rules:
mocha/no-exclusive-tests: error
mocha/no-identical-title: error
mocha/no-nested-tests: error
mocha/no-sibling-hooks: error
mocha/no-top-level-hooks: error
max-nested-callbacks: off
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
nise.js
coverage/
site/
.nyc_output/
History.md
2 changes: 2 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This project uses Prettier defaults, the config file is present in
# order to trigger editor plugins to allow format on save behaviour
28 changes: 14 additions & 14 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ We pledge to act and interact in ways that contribute to an open, welcoming, div

Examples of behavior that contributes to a positive environment for our community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall community
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Expand Down Expand Up @@ -67,7 +67,7 @@ Community leaders will follow these Community Impact Guidelines in determining t

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the community.

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ Support us with a monthly donation and help us continue our activities. [[Become
<a href="https://opencollective.com/sinon/backer/28/website" target="_blank"><img src="https://opencollective.com/sinon/backer/28/avatar.svg"></a>
<a href="https://opencollective.com/sinon/backer/29/website" target="_blank"><img src="https://opencollective.com/sinon/backer/29/avatar.svg"></a>


## Sponsors

Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/sinon#sponsor)]
Expand Down
Loading

0 comments on commit f7ab6ec

Please sign in to comment.