Skip to content

Commit d4191cc

Browse files
authored
build: remove need for custom eslint-plugin-stdlib bundle
PR-URL: #10948 Reviewed-by: Athan Reines <kgryte@gmail.com> Closes: stdlib-js/metr-issue-tracker#67
1 parent 0dc62ae commit d4191cc

6 files changed

Lines changed: 98 additions & 172 deletions

File tree

etc/eslint/plugin/index.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* @license Apache-2.0
3+
*
4+
* Copyright (c) 2026 The Stdlib Authors.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
'use strict';
20+
21+
// MODULES //
22+
23+
// eslint-disable-next-line node/no-unpublished-require
24+
var plugin = require( './../../../lib/node_modules/@stdlib/_tools/eslint/rules/scripts/plugin.js' );
25+
26+
27+
// EXPORTS //
28+
29+
module.exports = plugin;

etc/eslint/plugin/package.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "eslint-plugin-stdlib",
3+
"version": "0.0.0",
4+
"description": "ESLint plugin providing custom stdlib lint rules.",
5+
"license": "Apache-2.0",
6+
"author": {
7+
"name": "The Stdlib Authors",
8+
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
9+
},
10+
"contributors": [
11+
{
12+
"name": "The Stdlib Authors",
13+
"url": "https://github.com/stdlib-js/stdlib/graphs/contributors"
14+
}
15+
],
16+
"main": "./index.js",
17+
"scripts": {},
18+
"homepage": "https://github.com/stdlib-js/stdlib",
19+
"repository": {
20+
"type": "git",
21+
"url": "git://github.com/stdlib-js/stdlib.git"
22+
},
23+
"bugs": {
24+
"url": "https://github.com/stdlib-js/stdlib/issues"
25+
},
26+
"dependencies": {},
27+
"devDependencies": {},
28+
"engines": {
29+
"node": ">=0.10.0",
30+
"npm": ">2.7.0"
31+
},
32+
"os": [
33+
"aix",
34+
"darwin",
35+
"freebsd",
36+
"linux",
37+
"macos",
38+
"openbsd",
39+
"sunos",
40+
"win32",
41+
"windows"
42+
],
43+
"keywords": [
44+
"stdlib",
45+
"eslint",
46+
"eslint-plugin",
47+
"lint"
48+
]
49+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
"eslint-plugin-expect-type": "^0.2.3",
145145
"eslint-plugin-import": "^2.29.0",
146146
"eslint-plugin-jsdoc": "^46.8.2",
147+
"eslint-plugin-stdlib": "file:./etc/eslint/plugin",
147148
"exorcist": "^2.0.0",
148149
"factor-bundle": "^2.5.0",
149150
"gh-pages": "git+https://github.com/Planeshifter/gh-pages.git#main",

tools/make/lib/init/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@
1919
# DEPENDENCIES #
2020

2121
# Note: keep in alphabetical order...
22-
include $(TOOLS_MAKE_LIB_DIR)/init/eslint.mk
2322
include $(TOOLS_MAKE_LIB_DIR)/init/git_hooks.mk
2423

2524

2625
# RULES #
2726

2827
#/
29-
# Performs initialization tasks, such as installing Git hooks, installing custom lint plugins, etc.
28+
# Performs initialization tasks, such as installing Git hooks.
3029
#
3130
# ## Notes
3231
#
@@ -35,7 +34,7 @@ include $(TOOLS_MAKE_LIB_DIR)/init/git_hooks.mk
3534
# @example
3635
# make init
3736
#/
38-
init: init-git-hooks init-eslint-plugins
37+
init: init-git-hooks
3938
$(QUIET) echo "Initialization successful."
4039

4140
.PHONY: init

tools/make/lib/init/README.md

Lines changed: 17 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ limitations under the License.
2626

2727
<section class="intro">
2828

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

3131
</section>
3232

@@ -58,50 +58,6 @@ $ make init
5858

5959
* * *
6060

61-
### ESLint
62-
63-
#### init-eslint-rules-plugin
64-
65-
Initializes custom [ESLint][eslint] rules.
66-
67-
<!-- run-disable -->
68-
69-
```bash
70-
$ make init-eslint-rules-plugin
71-
```
72-
73-
#### init-eslint-plugins
74-
75-
Initializes custom [ESLint][eslint] plugins.
76-
77-
<!-- run-disable -->
78-
79-
```bash
80-
$ make init-eslint-plugins
81-
```
82-
83-
#### clean-eslint-rules-plugin
84-
85-
Removes custom [ESLint][eslint] rules.
86-
87-
<!-- run-disable -->
88-
89-
```bash
90-
$ make clean-eslint-rules-plugin
91-
```
92-
93-
#### clean-eslint-plugins
94-
95-
Removes custom [ESLint][eslint] plugins.
96-
97-
<!-- run-disable -->
98-
99-
```bash
100-
$ make clean-eslint-plugins
101-
```
102-
103-
* * *
104-
10561
### Git
10662

10763
#### init-git-hooks
@@ -128,6 +84,22 @@ $ make init-git-hooks
12884

12985
<!-- /.notes -->
13086

87+
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
88+
89+
<section class="related">
90+
91+
</section>
92+
93+
<!-- /.related -->
94+
95+
<!-- Section for examples. -->
96+
97+
<section class="examples">
98+
99+
</section>
100+
101+
<!-- /.examples -->
102+
131103
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
132104

133105
<section class="links">
@@ -138,8 +110,6 @@ $ make init-git-hooks
138110

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

141-
[eslint]: https://eslint.org/
142-
143113
</section>
144114

145115
<!-- /.links -->

tools/make/lib/init/eslint.mk

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
 (0)