Skip to content

Commit

Permalink
Merge pull request todogroup#190 from newrelic-forks/master
Browse files Browse the repository at this point in the history
chore: switch linter to eslint-config-prettier-standard
  • Loading branch information
prototypicalpro authored Nov 24, 2020
2 parents 895fdb0 + aab6988 commit 8d21449
Show file tree
Hide file tree
Showing 100 changed files with 4,217 additions and 2,797 deletions.
14 changes: 2 additions & 12 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,10 @@ env:
es6: true
node: true
mocha: true
extends:
- 'eslint:recommended'
- 'plugin:jsdoc/recommended'
- 'standard'
extends:
- 'prettier-standard'
globals:
Atomics: 'readonly'
SharedArrayBuffer: 'readonly'
parserOptions:
ecmaVersion: 2018
rules:
jsdoc/require-jsdoc: 0
jsdoc/check-tag-names: 0
settings:
jsdoc:
mode: 'typescript'
plugins:
- 'jsdoc'
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

*.js text eol=lf
*.ts text eol=lf
7 changes: 3 additions & 4 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repository:

# A URL with more information about the repository
homepage: https://todogroup.org

# Collaborators: give specific users access to this repository.
# see /governance/roles.md for details on write access policy
# note that the permissions below may provide wider access than needed for
Expand All @@ -18,10 +18,9 @@ repository:
collaborators:
- username: caniszczyk
permission: admin

- username: trevmex
permission: admin

- username: prototypicalpro
permission: admin

68 changes: 34 additions & 34 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
name: 'CodeQL'

on:
push:
Expand All @@ -29,43 +29,43 @@ jobs:
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.nyc_output
.bundle
vendor
.github
55 changes: 30 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,39 @@
## 1.0.0

### Breaking Changes
* The ruleset configuration format has been upgraded to [version 2](./README.md#creating-a-ruleset), including adding a [JSON schema](./rulesets/schema.json) and support for YAML. The previous ruleset format is still supported, however it is recommended that you translate your rulesets for this upgrade.
* Major changes have been made to the `lint` function:
* Formatting and printing have been moved outside `lint`, allowing the developer to suppress or modify the output as needed. This change is reflected in the new [CLI implementation](./bin/repolinter.js).
* The object returned by lint (`LintResult`) has been completely restructured.
* A `dryRun` parameter has been added to disable fixes.
* `async` was added to the function interface.
* Major changes have been make to the [JSON Formatter](index.js) to accommodate the structure change of `LintResult`.
* Non top-level configuration support (ex. `targetdir/otherdir/repolinter.json` would trigger another lint of `otherdir`) has been removed for now.
* Renamed several rule options to more clearly convey functionality (`files` -> `globsAny`) and remove problematic language (`blacklist` -> `denylist`). Backwards compatibility for old property names in version 1 rulesets is still maintained, however the schema will fail to validate in version 2.
* Some slight changes have been made to the default formatter to accommodate the feature list below.

- The ruleset configuration format has been upgraded to [version 2](./README.md#creating-a-ruleset), including adding a [JSON schema](./rulesets/schema.json) and support for YAML. The previous ruleset format is still supported, however it is recommended that you translate your rulesets for this upgrade.
- Major changes have been made to the `lint` function:
- Formatting and printing have been moved outside `lint`, allowing the developer to suppress or modify the output as needed. This change is reflected in the new [CLI implementation](./bin/repolinter.js).
- The object returned by lint (`LintResult`) has been completely restructured.
- A `dryRun` parameter has been added to disable fixes.
- `async` was added to the function interface.
- Major changes have been make to the [JSON Formatter](index.js) to accommodate the structure change of `LintResult`.
- Non top-level configuration support (ex. `targetdir/otherdir/repolinter.json` would trigger another lint of `otherdir`) has been removed for now.
- Renamed several rule options to more clearly convey functionality (`files` -> `globsAny`) and remove problematic language (`blacklist` -> `denylist`). Backwards compatibility for old property names in version 1 rulesets is still maintained, however the schema will fail to validate in version 2.
- Some slight changes have been made to the default formatter to accommodate the feature list below.

### Features
* [Automatic fixes](./docs/fixes.md) have been added. These fixes must be [configured in your ruleset](./README.md#rules) before they can be used, but are otherwise enabled by default.
* [Markdown formatting](README.md#formatting-the-output) is now supported via a CLI argument.
* CLI argument parsing has re-implemented with [Yargs](https://github.com/yargs/yargs) to allow for a more user-friendly experience. All previous commands and arguments remain, and the following new options are now available:
* `--dryRun`/`-d` - Disable fixes.
* `--allowPaths`/`-a` - Specify an allowlist that repolinter should limit itself to.
* `--rulesetFile`/`-r` - Manually specify the configuration repolinter should use.
* `--rulesetUrl`/`-u` - Specify a URL where repolinter can retrieve the ruleset from.
* `--format`/`-f` - Change the output format.

- [Automatic fixes](./docs/fixes.md) have been added. These fixes must be [configured in your ruleset](./README.md#rules) before they can be used, but are otherwise enabled by default.
- [Markdown formatting](README.md#formatting-the-output) is now supported via a CLI argument.
- CLI argument parsing has re-implemented with [Yargs](https://github.com/yargs/yargs) to allow for a more user-friendly experience. All previous commands and arguments remain, and the following new options are now available:

- `--dryRun`/`-d` - Disable fixes.
- `--allowPaths`/`-a` - Specify an allowlist that repolinter should limit itself to.
- `--rulesetFile`/`-r` - Manually specify the configuration repolinter should use.
- `--rulesetUrl`/`-u` - Specify a URL where repolinter can retrieve the ruleset from.
- `--format`/`-f` - Change the output format.

For more information on these options please see the [Repolinter CLI](./bin/repolinter.js).
* Added several other functions to the Node API: `runRuleset`, `determineTargets`, `validateConfig`, and `parseConfig`.
* Added TypeScript types for the Node API.
* Add numerical comparison support for axioms and the [`contributor-count`](./docs/axioms.md#contributor-count) axiom.

- Added several other functions to the Node API: `runRuleset`, `determineTargets`, `validateConfig`, and `parseConfig`.
- Added TypeScript types for the Node API.
- Add numerical comparison support for axioms and the [`contributor-count`](./docs/axioms.md#contributor-count) axiom.

### Fixes
* All file-based operations have been moved to `fs.promises`, which increased performance by a factor of 10.
* Fixed some issues with Windows paths.
* Updated NPM dependencies.
* Added more tests and [autogenerated documentation](https://todogroup.github.io/repolinter/).

- All file-based operations have been moved to `fs.promises`, which increased performance by a factor of 10.
- Fixed some issues with Windows paths.
- Updated NPM dependencies.
- Added more tests and [autogenerated documentation](https://todogroup.github.io/repolinter/).
Loading

0 comments on commit 8d21449

Please sign in to comment.