@checkdigit/spectral-config 0.0.1-PR.2-7bdd

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2021-2023 Check Digit, LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # Check Digit Spectral Config
2
+
3
+ The Check Digit Spectral Config is the standard package to install and configure [Spectral](https://stoplight.io/open-source/spectral/) for use in Check Digit projects.
4
+
5
+ ### Installing
6
+
7
+ Spectral Config should be installed as a dev dependency:
8
+ `npm install @checkdigit/spectral-config --save-dev`
9
+
10
+ ### Additional Setup
11
+
12
+ Once installed, add a file named `.spectral.json` to the root of your project. This file should extend the Check Digit Spectral Config:
13
+
14
+ ```jsonc
15
+ {
16
+ "extends": ["@checkdigit/spectral-config"]
17
+ }
18
+ ```
19
+
20
+ Also add the following to your `package.json` to run Spectral:
21
+
22
+ ```jsonc
23
+ "scripts": {
24
+ // ...
25
+ "lint:spec": "spectral lint src/**/swagger.yml",
26
+ }
27
+ ```
28
+
29
+ To include Spectral in your project's CI/CD pipeline, add the following to your `package.json`:
30
+
31
+ ```jsonc
32
+ "scripts": {
33
+ // ...
34
+ "ci:lint": "npm run lint && npm run lint:spec",
35
+ }
36
+ ```
@@ -0,0 +1,6 @@
1
+ declare const _default: {
2
+ extends: string[];
3
+ rules: never[];
4
+ };
5
+ export default _default;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAEA,wBAGE"}
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ // index.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.default = {
5
+ extends: ['spectral:oas'],
6
+ rules: [],
7
+ };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,WAAW;;AAEX,kBAAe;IACb,OAAO,EAAE,CAAC,cAAc,CAAC;IACzB,KAAK,EAAE,EAAE;CACV,CAAC"}
package/package.json ADDED
@@ -0,0 +1 @@
1
+ {"name":"@checkdigit/spectral-config","version":"0.0.1-PR.2-7bdd","description":"Check Digit Spectral Config","typings":"./dist/index.d.ts","main":"./dist/index.js","prettier":"@checkdigit/prettier-config","engines":{"node":">=12.18","npm":">=6.14"},"files":["dist","/src/"],"repository":{"type":"git","url":"git+https://github.com/checkdigit/spectral-config.git"},"author":"Check Digit, LLC","license":"UNLICENSED","bugs":{"url":"https://github.com/checkdigit/spectral-config/issues"},"homepage":"https://github.com/checkdigit/spectral-config#readme","devDependencies":{"@checkdigit/eslint-config":"7.5.0","@checkdigit/prettier-config":"^3.2.0","@checkdigit/typescript-config":"^3.2.0"},"peerDependencies":{"@stoplight/spectral-cli":"6.6.0"},"scripts":{"postversion":"git push && git push --tags","prettier":"prettier --ignore-path .gitignore --list-different .","prettier:fix":"prettier --ignore-path .gitignore --write .","lint":"eslint -f unix --ext .ts src","test":"npm run ci:test","ci:test":"npm run ci:compile && npm run ci:lint && npm run ci:style","ci:compile":"tsc --noEmit","ci:lint":"npm run lint","ci:style":"npm run prettier"},"eslintConfig":{"extends":["@checkdigit/eslint-config"]},"jest":{"preset":"@checkdigit/jest-config","testTimeout":100000}}
package/src/index.ts ADDED
@@ -0,0 +1,6 @@
1
+ // index.ts
2
+
3
+ export default {
4
+ extends: ['spectral:oas'],
5
+ rules: [],
6
+ };