diff --git a/.circleci/config.yml b/.circleci/config.yml index dfe21ab..5098b04 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,29 +1,97 @@ -# Javascript Node CircleCI 2.0 configuration file -# + version: 2 -jobs: - build: - docker: - - image: circleci/node:11.0.0 - working_directory: ~/standardly +defaults: &defaults + working_directory: ~/standardly + docker: + - image: circleci/node:latest-browsers +jobs: + install: + <<: *defaults steps: - checkout - - # Download and cache dependencies - restore_cache: keys: - - v1-dependencies-{{ checksum "package.json" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - - run: npm install - + # Find a cache corresponding to this specific package.json checksum + # when this file is changed, this key will fail + - standardly-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum ".circleci/config.yml" }} + - standardly-{{ .Branch }}-{{ checksum "package-lock.json" }} + - standardly-{{ .Branch }} + # Find the most recent cache used from any branch + - standardly-master + - standardly- + - run: + name: Install Dependencies + command: yarn install --frozen-lockfile - save_cache: + key: standardly-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum ".circleci/config.yml" }} paths: - node_modules - key: v1-dependencies-{{ checksum "package.json" }} + - ~/.cache/yarn + - persist_to_workspace: + root: . + paths: + - . + + test: + <<: *defaults + steps: + - attach_workspace: + at: ~/standardly + - run: + name: Test + command: yarn test + + lint: + <<: *defaults + steps: + - attach_workspace: + at: ~/standardly + - run: + name: Lint + command: yarn lint + + # integration: + # <<: *defaults + # steps: + # - attach_workspace: + # at: ~/standardly + # - run: + # name: Integration Tests + # command: yarn test:integration + + release: + <<: *defaults + steps: + - attach_workspace: + at: ~/standardly + - run: mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config + - run: + name: Release + command: yarn release + +workflows: + version: 2 + build_and_test: + jobs: + - install + + - test: + requires: + - install + + - lint: + requires: + - install - # run tests! - - run: npm test + # - integration: + # requires: + # - install + + - release: + requires: + - lint + - test + # - integration + diff --git a/.github/code_of_conduct.md b/.github/code_of_conduct.md index 82e7cc2..3bc6b18 100644 --- a/.github/code_of_conduct.md +++ b/.github/code_of_conduct.md @@ -1,2 +1,2 @@ -Thank you for considering contributing your time and brilliance to standardly. +Thank you for considering contributing your time and brilliance to standardly. At Intuit, we take our open source code of conduct seriously. Please take a moment to read our [code of conduct](https://opensource.intuit.com/#coc) before you create any pull request or issue. diff --git a/.github/issue_template/bug_template.md b/.github/issue_template/bug_template.md index 6bc81f7..38769e9 100644 --- a/.github/issue_template/bug_template.md +++ b/.github/issue_template/bug_template.md @@ -3,6 +3,7 @@ Before you submit an issue, ensure that the issue is not already found in this l If you are absolutely sure that this issue isnt already open, clearly describe the problem providing the reason why you believe it needs to be solved. If this is a bug please include steps to reproduce the bug, including logs / screenshots as appropriate --- + name: Bug Report about: Sorry that you are facing a problem. Thank you for helping us keep those pesky bugs off! title: '' @@ -24,6 +25,7 @@ assignees: '' **Log or report files** + **Screenshots** @@ -32,7 +34,7 @@ assignees: '' **Desktop (please complete the following information):** -- OS: +- OS: - node version: - npm version: - version of this module: diff --git a/.github/issue_template/feature_req_template.md b/.github/issue_template/feature_req_template.md index 2721b6c..8c56091 100644 --- a/.github/issue_template/feature_req_template.md +++ b/.github/issue_template/feature_req_template.md @@ -1,8 +1,9 @@ Before you submit an issue, ensure that the issue is not already found in this list. -If you are absolutely sure that this issue isnt already open, clearly describe the problem providing the reason why you believe it needs to be solved. If this is a bug please include steps to reproduce the bug, including logs / screenshots as appropriate +If you are absolutely sure that this issue isn't already open, clearly describe the problem providing the reason why you believe it needs to be solved. If this is a bug please include steps to reproduce the bug, including logs / screenshots as appropriate --- + name: Feature Request about: You have an idea? We are all ears! title: '' diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 6316861..04a9ad0 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,3 @@ - **Description** @@ -9,10 +8,9 @@ +Check the following: -Check the following: - [ ] The PR is not huge (it has less than a few files, and very few lines of change overall) - [ ] Proper tests are added/updated -- [ ] All tests pass and there are no merge conflicts - \ No newline at end of file + diff --git a/package.json b/package.json index ea8070c..d8ecfc0 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "standardly", + "name": "@intuit/standardly", "version": "0.1.0", "description": "DIY framework for Standards Governance", "main": "index.js", @@ -9,7 +9,8 @@ "scripts": { "test": "nyc --reporter=cobertura mocha './test/unit/*.js'", "test:integration": "mocha './test/integration/*.js'", - "lint": "node_modules/.bin/eslint ." + "lint": "node_modules/.bin/eslint src test", + "release": "auto shipit" }, "repository": { "type": "git", @@ -20,7 +21,7 @@ "governance", "compliance" ], - "author": "", + "author": "Andrew Lisowski ", "license": "Apache-2.0", "dependencies": { "app-root-path": "2.1.0", @@ -35,11 +36,19 @@ "request": "2.88.0" }, "devDependencies": { + "auto": "^7.3.0", + "babel-eslint": "^10.0.2", "chai": "4.2.0", "chai-as-promised": "7.1.1", "csvtojson": "2.0.8", - "eslint": "5.12.1", + "eslint": "^6.1.0", + "eslint-config-airbnb": "^18.0.1", + "eslint-config-airbnb-base": "^14.0.0", + "eslint-plugin-import": "^2.18.2", + "eslint-plugin-jsx-a11y": "^6.2.3", "eslint-plugin-mocha": "5.2.0", + "eslint-plugin-react": "^7.14.3", + "eslint-plugin-react-hooks": "^1.7.0", "husky": "1.3.1", "mocha": "5.2.0", "nyc": "14.1.1", @@ -47,7 +56,7 @@ }, "husky": { "hooks": { - "pre-commit": "node_modules/.bin/eslint --fix . && npm test && npm run test:integration" + "pre-commit": "npm run lint -- --fix && npm test && npm run test:integration" } }, "bin": { @@ -55,5 +64,11 @@ }, "engines": { "node": ">=10.16.0" + }, + "auto": { + "plugins": [ + "npm", + "released" + ] } }