Skip to content

Commit

Permalink
chore: Run prettier on MD, Yaml, and JSON files (#541)
Browse files Browse the repository at this point in the history
* chore: Run prettier on Markdown

* chore: Run prettier on Yaml

* chore: Run prettier on JSON

* chore: Update Lint CI globs

Co-authored-by: Jason Dent <Jason3S@users.noreply.github.com>
  • Loading branch information
nschonni and Jason3S committed Nov 10, 2020
1 parent 0e07b80 commit e6edbf4
Show file tree
Hide file tree
Showing 40 changed files with 543 additions and 469 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ indent_size = 2
indent_size = 2

[*.md]
indent_size = 2
trim_trailing_whitespace = false
18 changes: 9 additions & 9 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ about: Create a report to help us improve
title: ''
labels: Needs Investigating, bug, new issue
assignees: ''

---

## Info

**Kind of Issue**

- [ ] runtime - command-line tools
- [ ] building / compiling
- [ ] security
Expand All @@ -27,7 +27,7 @@ assignees: ''

Version:

*Issue with supporting library?*
_Issue with supporting library?_

- [ ] No
- [ ] cspell-glob -- library for matching glob patterns
Expand All @@ -38,29 +38,30 @@ Version:

**OS:**

- [ ] Macos
- [ ] Linux
- [ ] Windows
- [ ] Other
- [ ] Macos
- [ ] Linux
- [ ] Windows
- [ ] Other

**version:**

OS version if applicable.

## Bug Description

**Describe the bug**

A clear and concise description of what the bug is.

**To Reproduce**

Steps to reproduce the behavior:

1. Command line '...'
2.
2.
3. Scroll down to '....'
4. See error


**Expected behavior**

A clear and concise description of what you expected to happen.
Expand All @@ -69,7 +70,6 @@ A clear and concise description of what you expected to happen.

If applicable, add screenshots to help explain your problem.


**Additional context**

Add any other context about the problem here.
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: enhancement, new issue
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ on:
- "**/*.js"
- "**/*.ts"
schedule:
- cron: '0 23 * * 0'
- cron: "0 23 * * 0"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: 'javascript'
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: "javascript"

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
4 changes: 2 additions & 2 deletions .github/workflows/cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ jobs:
cspell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npx cspell "**/{*.ts,*.md}"
- uses: actions/checkout@v2
- run: npx cspell "**/{*.ts,*.md}"
25 changes: 12 additions & 13 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:

jobs:
test:

runs-on: ${{ matrix.os }}

strategy:
Expand Down Expand Up @@ -38,15 +37,15 @@ jobs:
- TheAlgorithms/Python

steps:
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.2
with:
node-version: ${{ matrix.node-version }}

- run: npm ci
- run: >
cd integration-tests
&& npm ci
&& npm run integration-tests -- ${{ matrix.repo }}
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.2
with:
node-version: ${{ matrix.node-version }}

- run: npm ci
- run: >
cd integration-tests
&& npm ci
&& npm run integration-tests -- ${{ matrix.repo }}
18 changes: 5 additions & 13 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,14 @@ name: Lint
on:
pull_request:
paths:
- '.github/workflows/lint.yml'
- '**/tsconfig.json'
- '**/.eslintrc.js'
- '**/.eslintignore'
- '**/package*.json'
- '**/*.ts'
- "**/.eslintignore"
- "**/*.{js,ts,md,yaml,yml,json}"
push:
paths:
- '.github/workflows/lint.yml'
- '**/tsconfig.json'
- '**/.eslintrc.js'
- '**/.eslintignore'
- '**/package*.json'
- '**/*.ts'
- "**/.eslintignore"
- "**/*.{js,ts,md,yaml,yml,json}"
branches-ignore:
- 'dependabot/*'
- "dependabot/*"

jobs:
lint:
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:

jobs:
test:

runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -23,22 +22,22 @@ jobs:
- macos-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.2
with:
node-version: ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.2
with:
node-version: ${{ matrix.node-version }}

- run: npm ci
- run: npm ci

- run: npm test
- run: npm test

- run: npm run test-spec
- run: npm run test-spec

- run: node ./bin.js trace test
- run: node ./bin.js trace test

- run: node ./bin.js "**/{*.ts,*.md}"
- run: node ./bin.js "**/{*.ts,*.md}"

# Ensure the repository is clean after build & test
- run: git --no-pager diff --compact-summary --exit-code
# Ensure the repository is clean after build & test
- run: git --no-pager diff --compact-summary --exit-code
15 changes: 7 additions & 8 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---

# For use with pre-commit.
# See usage instructions at http://pre-commit.com

- id: cspell
name: cspell
description: This hook runs cspell spellchecker
entry: cspell
language: node
types: [file]
verbose: true
- id: cspell
name: cspell
description: This hook runs cspell spellchecker
entry: cspell
language: node
types: [file]
verbose: true
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
cspell.schema.json
tsconfig*.json
integration-tests/config/config.json
cspell.json
.vscode/
[sS]amples/
10 changes: 9 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"printWidth": 120,
"singleQuote": true
"singleQuote": true,
"overrides": [
{
"files": "**/*.{yaml,yml}",
"options": {
"singleQuote": false
}
}
]
}
28 changes: 14 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ These are some notes about contributing.

### Code Coverage

* https://coveralls.io/github/streetsidesoftware/cspell
- https://coveralls.io/github/streetsidesoftware/cspell

### NPM

* https://www.npmjs.com/package/cspell
* https://www.npmjs.com/package/cspell-lib
* https://www.npmjs.com/package/cspell-trie
* https://www.npmjs.com/package/cspell-tools
* https://www.npmjs.com/package/cspell-glob
- https://www.npmjs.com/package/cspell
- https://www.npmjs.com/package/cspell-lib
- https://www.npmjs.com/package/cspell-trie
- https://www.npmjs.com/package/cspell-tools
- https://www.npmjs.com/package/cspell-glob

## Development

Node JS version 8 or higher is required.

### Commands

| Command | Description |
| ------- | ----------- |
| `npm install` | Installs all the dependencies for all packages |
| `npm run build` | To compile the typescript into javascript |
| `npm test` | Runs the unit tests for all packages |
| `npm run check-spelling` | Checks the spelling for all sources files |
| `npm run coverage` | Generates coverage information for all projects. Open `coverage/index.html` to view coverage. |
| `npx lerna publish` | To publish the packages (must have permissions) |
| Command | Description |
| ------------------------ | --------------------------------------------------------------------------------------------- |
| `npm install` | Installs all the dependencies for all packages |
| `npm run build` | To compile the typescript into javascript |
| `npm test` | Runs the unit tests for all packages |
| `npm run check-spelling` | Checks the spelling for all sources files |
| `npm run coverage` | Generates coverage information for all projects. Open `coverage/index.html` to view coverage. |
| `npx lerna publish` | To publish the packages (must have permissions) |
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# cspell

The cspell mono-repo, a spell checker for code.

## Packages

- [cspell](packages/cspell) -- cspell command-line application
- [cspell-glob](packages/cspell-glob) -- glob library.
- [cspell-io](packages/cspell-io) -- i/o library.
Expand Down
1 change: 0 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

## Supported Versions


| Version | Supported |
| ------- | ------------------ |
| 5.x | :white_check_mark: |
Expand Down
12 changes: 6 additions & 6 deletions codecov.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
coverage:
status:
project:
default:
target: auto
threshold: 1%
patch: off
status:
project:
default:
target: auto
threshold: 1%
patch: off
Loading

0 comments on commit e6edbf4

Please sign in to comment.