-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add
@distributive
eslint config
In addition to adding the config, lint issues were addressed.
- Loading branch information
1 parent
dec6493
commit e37a352
Showing
6 changed files
with
190 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,38 @@ | ||
"use strict"; | ||
/** | ||
* @file .eslintrc.js - Configures ESLint for the plugin repo. | ||
* | ||
* @author Joash Mathew <[email protected]> | ||
* @author Bryan Hoang <[email protected]> | ||
* @date June 2023, Aug. 2023 | ||
*/ | ||
'use strict'; | ||
|
||
/** @type {import('eslint').Linter.Config} */ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:n/recommended", | ||
"plugin:eslint-plugin/tests", | ||
"plugin:eslint-plugin/rules-recommended", | ||
'eslint:recommended', | ||
'plugin:n/recommended', | ||
'plugin:eslint-plugin/tests', | ||
'plugin:eslint-plugin/rules-recommended', | ||
'@distributive', | ||
'plugin:@distributive/recommended', | ||
], | ||
env: { | ||
node: true, | ||
}, | ||
overrides: [ | ||
{ | ||
files: ["tests/**/*.js"], | ||
env: { mocha: true }, | ||
overrides: [ { | ||
files: ['**/*.mjs'], | ||
parserOptions: { | ||
sourceType: 'module', | ||
}, | ||
}, | ||
], | ||
rules: { | ||
"eslint-plugin/meta-property-ordering": "error", | ||
"eslint-plugin/report-message-format": ["error", "^[A-Z].*\\.$"], | ||
"eslint-plugin/require-meta-docs-description": [ | ||
"error", | ||
{ | ||
'eslint-plugin/meta-property-ordering': 'error', | ||
'eslint-plugin/report-message-format': ['error', '^[A-Z].*\\.$'], | ||
'eslint-plugin/require-meta-docs-description': [ | ||
'error', { | ||
pattern: '^(Enforce|Require|Disallow)', | ||
}, | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
/** | ||
* @fileoverview Plugin containing Distributive style guide stuff | ||
* @author Joash Mathew | ||
* @file lib/index.js - Entrypoint for the plugin. | ||
* | ||
* @author Joash Mathew <[email protected]> | ||
* @author Bryan Hoang <[email protected]> | ||
* @date June 2023, Aug. 2023 | ||
*/ | ||
"use strict"; | ||
|
||
//------------------------------------------------------------------------------ | ||
'use strict'; | ||
|
||
// ------------------------------------------------------------------------------ | ||
// Requirements | ||
//------------------------------------------------------------------------------ | ||
// ------------------------------------------------------------------------------ | ||
|
||
// ------------------------------------------------------------------------------ | ||
// Plugin Definition | ||
//------------------------------------------------------------------------------ | ||
// ------------------------------------------------------------------------------ | ||
|
||
module.exports.meta = { | ||
name: "eslint-plugin-distributive", | ||
version: "1.0.0", | ||
name: 'eslint-plugin-distributive', | ||
version: '1.0.0', | ||
} | ||
|
||
// import all rules in lib/rules | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
/** | ||
* @fileoverview Enforce bracing styles in accordance to the Distributive style guide | ||
* @author Joash Mathew | ||
* @file brace-style.test.js - Tests the custom brace-style rule against | ||
* valid & invalid test cases. | ||
* | ||
* @author Joash Mathew <[email protected]> | ||
* @author Bryan Hoang <[email protected]> | ||
* @date June 2023, Aug. 2023 | ||
*/ | ||
|
||
'use strict'; | ||
|
||
// ------------------------------------------------------------------------------ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
/** | ||
* @file vitest.config.mjs - Configures `vitest` for testing the project. | ||
* | ||
* See {@link https://vitest.dev/config/}. | ||
* | ||
* @author Bryan Hoang <[email protected]> | ||
* @date Aug. 2023 | ||
*/ | ||
|
||
import { defineConfig } from 'vitest/config'; | ||
|
||
export default defineConfig({ | ||
|