Skip to content
Draft
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
22 changes: 22 additions & 0 deletions etc/eslint/plugin/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* @license Apache-2.0
*
* Copyright (c) 2026 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

'use strict';

// eslint-disable-next-line stdlib/no-dynamic-exports, node/no-unpublished-require
module.exports = require( './../../../lib/node_modules/@stdlib/_tools/eslint/rules/scripts/plugin.js' );
38 changes: 38 additions & 0 deletions etc/eslint/plugin/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "eslint-plugin-stdlib",
"version": "0.0.0",
"description": "ESLint plugin providing custom stdlib lint rules.",
"license": "Apache-2.0",
"author": {
"name": "The Stdlib Authors",
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
},
"contributors": [
{
"name": "The Stdlib Authors",
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
}
],
"main": "./index.js",
"scripts": {},
"homepage": "https://github.com/stdlib-js/stdlib",
"repository": {
"type": "git",
"url": "git://github.com/stdlib-js/stdlib.git"
},
"bugs": {
"url": "https://github.com/stdlib-js/stdlib/issues"
},
"dependencies": {},
"devDependencies": {},
"engines": {
"node": ">=0.10.0",
"npm": ">2.7.0"
},
"keywords": [
"stdlib",
"eslint",
"eslint-plugin",
"lint"
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
"eslint-plugin-expect-type": "^0.2.3",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jsdoc": "^46.8.2",
"eslint-plugin-stdlib": "file:./etc/eslint/plugin",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the ESLint v9 migration, this will become unnecessary and we won't need a plugin at all anymore.

"exorcist": "^2.0.0",
"factor-bundle": "^2.5.0",
"gh-pages": "git+https://github.com/Planeshifter/gh-pages.git#main",
Expand Down
5 changes: 2 additions & 3 deletions tools/make/lib/init/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@
# DEPENDENCIES #

# Note: keep in alphabetical order...
include $(TOOLS_MAKE_LIB_DIR)/init/eslint.mk
include $(TOOLS_MAKE_LIB_DIR)/init/git_hooks.mk


# RULES #

#/
# Performs initialization tasks, such as installing Git hooks, installing custom lint plugins, etc.
# Performs initialization tasks, such as installing Git hooks.
#
# ## Notes
#
Expand All @@ -35,7 +34,7 @@ include $(TOOLS_MAKE_LIB_DIR)/init/git_hooks.mk
# @example
# make init
#/
init: init-git-hooks init-eslint-plugins
init: init-git-hooks
$(QUIET) echo "Initialization successful."

.PHONY: init
63 changes: 17 additions & 46 deletions tools/make/lib/init/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ limitations under the License.

<section class="intro">

This directory contains [`make`][make] rules for initializing the project development environment (e.g., adding [Git][git] hooks, installing custom ESLint plugins, etc).
This directory contains [`make`][make] rules for initializing the project development environment (e.g., adding [Git][git] hooks).

</section>

Expand Down Expand Up @@ -58,50 +58,6 @@ $ make init

* * *

### ESLint

#### init-eslint-rules-plugin

Initializes custom [ESLint][eslint] rules.

<!-- run-disable -->

```bash
$ make init-eslint-rules-plugin
```

#### init-eslint-plugins

Initializes custom [ESLint][eslint] plugins.

<!-- run-disable -->

```bash
$ make init-eslint-plugins
```

#### clean-eslint-rules-plugin

Removes custom [ESLint][eslint] rules.

<!-- run-disable -->

```bash
$ make clean-eslint-rules-plugin
```

#### clean-eslint-plugins

Removes custom [ESLint][eslint] plugins.

<!-- run-disable -->

```bash
$ make clean-eslint-plugins
```

* * *

### Git

#### init-git-hooks
Expand All @@ -128,6 +84,22 @@ $ make init-git-hooks

<!-- /.notes -->

<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->

<section class="related">

</section>

<!-- /.related -->

<!-- Section for examples. -->

<section class="examples">

</section>

<!-- /.examples -->

<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->

<section class="links">
Expand All @@ -138,7 +110,6 @@ $ make init-git-hooks

[git-hooks]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks

[eslint]: https://eslint.org/

</section>

Expand Down
122 changes: 0 additions & 122 deletions tools/make/lib/init/eslint.mk

This file was deleted.

Loading