Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
/tmp/**
*.test.js
*.spec.js
markdown.config.js
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,9 @@ typings/
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
save-exact=true
save-prefix=
save=true
40 changes: 40 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch via NPM",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",
"debug"
],
"port": 9229
},
{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
"${workspaceFolder}/test"
],
"internalConsoleOptions": "openOnSessionStart"
},
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/lib/index.js"
}
]
}
Empty file added .vscode/settings.json
Empty file.
12 changes: 12 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "test",
"problemMatcher": []
}
]
}
29 changes: 29 additions & 0 deletions .zappr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
autobranch:
pattern: '{number}-{title}'
length: 60
commit:
message:
patterns:
- '^'
approvals:
minimum: 1
ignore: none
pattern: "^(:\\+1:|👍)$"
veto:
pattern: "^(:\\-1:|👎)$"
specification:
title:
minimum-length:
enabled: true
length: 8
body:
minimum-length:
enabled: true
length: 8
contains-url: true
contains-issue-number: true
template:
differs-from-body: true
pull-request:
labels:
additional: true
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@

[![License][license-image]][license-url]
[![FOSSA Status][fossa-image]][fossa-url]
[![NSP Status][nsp-image]][nsp-url]
[![Dependencies][daviddm-image]][daviddm-url]
[![Dependencies][daviddm-dev-image]][daviddm-dev-url]<br>
[![Travis branch][travis-image]][travis-url]
[![AppVeyor Windows build status][appveyor-image]][appveyor-url]
[![Coveralls coverage][coveralls-image]][coveralls-url]
[![Codacy Badge][codacy-image]][codacy-url]
[![Quality Gate][sonar-quality-gate-image]][sonar-quality-gate-url]
[![PRs Welcome][makeapullrequest-image]][makeapullrequest-url]

## Table of contents
Expand Down
10 changes: 4 additions & 6 deletions jsdoc.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
"includePattern": "lib.+\\.js(doc|x)?$",
"excludePattern": "tests(^|\\/|\\\\)_"
},
"plugins": [
"plugins/markdown"
],
"plugins": ["plugins/markdown"],
"templates": {
"cleverLinks": false,
"monospaceLinks": false,
Expand All @@ -27,7 +25,7 @@
"template": "./node_modules/docdash"
},
"docdash": {
"static": true,
"sort": true
}
"static": true,
"sort": true
}
}
16 changes: 8 additions & 8 deletions lib/crc/ast-config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
@fileoverview Espree AST parsing options. Ensure that the "tokens" property is set to true
@file Espree AST parsing options. Ensure that the "tokens" property is set to true
in order for CRC models to maintain a list of "references", i.e., where they
themselves are referenced.
*/
Expand Down Expand Up @@ -28,7 +28,7 @@ module.exports = {
attachComment: true,

/**
* Create a top-level tokens array containing all tokens
* Create a top-level tokens array containing all tokens.
*/
tokens: true,

Expand All @@ -47,32 +47,32 @@ module.exports = {

/**
* Specify which type of script you're parsing (script or module, default
* is script)
* is script).
*/
sourceType: "module",

/**
* Specify additional language features
* Specify additional language features.
*/
ecmaFeatures: {

/**
* Enable JSX parsing
* Enable JSX parsing.
*/
jsx: true,

/**
* Enable return in global scope
* Enable return in global scope.
*/
globalReturn: true,

/**
* Enable implied strict mode (if ecmaVersion >= 5)
* Enable implied strict mode (if ecmaVersion >= 5).
*/
impliedStrict: true,

/**
* Allow experimental object rest/spread
* Allow experimental object rest/spread.
*/
experimentalObjectRestSpread: true
}
Expand Down
4 changes: 2 additions & 2 deletions lib/crc/crc-class.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @fileoverview Create a `class` summary object for CrcModels.
* @file Create a `class` summary object for CrcModels.
* @author Greg Swindle (https://github.com/gregswindle)
*/
const { defaults } = require("lodash");
Expand Down Expand Up @@ -32,7 +32,7 @@ class CrcClass {
* (Class-Responsibility-Collaboration model).
* @class
* @public
* @param {Object} [params] - A parameter object that sets all of
* @param {object} [params] - A parameter object that sets all of
* the CrcClass's properties.
* @param {SourceCode} [params.code] - The ESLint
* {@link http://bit.ly/2kfR79f `SourceCode`} object.
Expand Down
2 changes: 1 addition & 1 deletion lib/crc/crc-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CrcContext {
*
* @static
* @param {Result} result - An ESLint Rule Result.
* @param {Object} descriptorFactory - An object that identifies ASTNodes
* @param {object} descriptorFactory - An object that identifies ASTNodes
* with ESQuery selectors.
* @returns {CrcContext} A CrcContext object.
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/crc/crc-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ class CrcModel {
* Create a shadow Class-Responsibility-Collaboration model.
*
* @class
* @param {Object} params - A parameter object that optionally sets all of
* @param {object} params - A parameter object that optionally sets all of
* the CrcModel's properties.
* @param {CrcClass} [params.class] - A `class` representation.
* @param {array.<CrcClass>} [params.collaborators] - A collection of zero or
* @param {Array.<CrcClass>} [params.collaborators] - A collection of zero or
* more CrcClasses that this object depends on.
* @param {array.<CrcResponsibility>} [params.responsibilities] - A list of
* @param {Array.<CrcResponsibility>} [params.responsibilities] - A list of
* data this object must maintain and/or operations it must perform.
* @example
* const crcModel = new CrcModel({
Expand Down
2 changes: 1 addition & 1 deletion lib/crc/descriptors/class-matcher-crc-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { first } = require("lodash");
* Create a `CrcClass` for ASPNodes identified by `ClassDeclarations` and
* `ClassExpressions`.
*
* @extends CrcClass
* @augments CrcClass
*/
class ClassMatcherCrcClass extends CrcClass {
/**
Expand Down
3 changes: 3 additions & 0 deletions lib/crc/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* `crc` module.
*
* @module eslint-plugin-crc/crc
* @author Greg Swindle <[email protected]>
*/
Expand All @@ -21,6 +22,7 @@ const CrcModel = require("./crc-model");
module.exports = {
/**
* A `class` "summary" `Object` used for reporting.
*
* @see CrcClass
*/
CrcClass,
Expand All @@ -29,6 +31,7 @@ module.exports = {
* Represents a Class-Responsibility-Collaboration model, which expresses the
* scope of an object's behaviors (**responsibilities**) and the objects it
* depends on to fulfill its responsibilities (**collaborators**).
*
* @see CrcModel
*/
CrcModel
Expand Down
2 changes: 1 addition & 1 deletion lib/formatters/crc/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @fileoverview Markdown reporter
* @file Markdown reporter
* @module eslint-plugin-crc/formatters/crc
* @author Greg Swindle
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @fileoverview Analyze and refactor JavaScript codebases with auto-generated
* @file Analyze and refactor JavaScript codebases with auto-generated
* Class-Responsibility-Collaboration models.
* @author Greg Swindle <[email protected]>
*/
Expand Down
Loading