@tony.ganchev/eslint-plugin-header 3.1.1 → 3.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,33 @@
1
+ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
+ # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
+
4
+ name: Node.js Package
5
+
6
+ on:
7
+ release:
8
+ types: [created]
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-node@v4
16
+ with:
17
+ node-version: 10
18
+ - run: npm ci
19
+ - run: npm test
20
+
21
+ publish-npm:
22
+ needs: build
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ - uses: actions/setup-node@v4
27
+ with:
28
+ node-version: 20
29
+ registry-url: https://registry.npmjs.org/
30
+ - run: npm ci
31
+ - run: npm publish
32
+ env:
33
+ NODE_AUTH_TOKEN: ${{secrets.npm_token}}
@@ -122,7 +122,96 @@ module.exports = {
122
122
  meta: {
123
123
  type: "layout",
124
124
  fixable: "whitespace",
125
- schema: false
125
+ schema: {
126
+ $ref: "#/definitions/options",
127
+ definitions: {
128
+ commentType: {
129
+ type: "string",
130
+ enum: ["block", "line"]
131
+ },
132
+ line: {
133
+ anyOf: [
134
+ {
135
+ type: "string"
136
+ },
137
+ {
138
+ type: "object",
139
+ properties: {
140
+ pattern: {
141
+ type: "string"
142
+ },
143
+ template: {
144
+ type: "string"
145
+ }
146
+ },
147
+ required: ["pattern"],
148
+ additionalProperties: false
149
+ }
150
+ ]
151
+ },
152
+ headerLines: {
153
+ anyOf: [
154
+ {
155
+ $ref: "#/definitions/line"
156
+ },
157
+ {
158
+ type: "array",
159
+ items: {
160
+ $ref: "#/definitions/line"
161
+ }
162
+ }
163
+ ]
164
+ },
165
+ numNewlines: {
166
+ type: "integer",
167
+ minimum: 0
168
+ },
169
+ settings: {
170
+ type: "object",
171
+ properties: {
172
+ lineEndings: {
173
+ type: "string",
174
+ enum: ["unix", "windows"]
175
+ }
176
+ },
177
+ additionalProperties: false
178
+ },
179
+ options: {
180
+ anyOf: [
181
+ {
182
+ type: "array",
183
+ minItems: 1,
184
+ maxItems: 2,
185
+ items: [
186
+ { type: "string" },
187
+ { $ref: "#/definitions/settings" }
188
+ ]
189
+ },
190
+ {
191
+ type: "array",
192
+ minItems: 2,
193
+ maxItems: 3,
194
+ items: [
195
+ { $ref: "#/definitions/commentType" },
196
+ { $ref: "#/definitions/headerLines" },
197
+ { $ref: "#/definitions/settings" }
198
+ ]
199
+ },
200
+ {
201
+ type: "array",
202
+ minItems: 3,
203
+ maxItems: 4,
204
+ items: [
205
+ { $ref: "#/definitions/commentType" },
206
+ { $ref: "#/definitions/headerLines" },
207
+ { $ref: "#/definitions/numNewlines" },
208
+ { $ref: "#/definitions/settings" }
209
+ ]
210
+ }
211
+ ]
212
+ }
213
+ }
214
+ }
126
215
  },
127
216
  create: function(context) {
128
217
  var options = context.options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tony.ganchev/eslint-plugin-header",
3
- "version": "3.1.1",
3
+ "version": "3.1.3",
4
4
  "description": "ESLint plugin to ensure that files begin with given comment",
5
5
  "main": "index.js",
6
6
  "scripts": {