-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(spectral-config): partially revert ESM (#724)
* chore: more prettier cleanup * Revert "feat(spectral): migrate to ESM (#718)" This reverts commit b1a4ee5. * revert: undo dependabot changes * chore: revert dep changes * chore: specify engines * chore: hide test warnings * fix: dynamically import alex * chore: lint
- Loading branch information
1 parent
8c43c69
commit c4161e3
Showing
21 changed files
with
71 additions
and
71 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,5 +1,4 @@ | ||
{ | ||
"extends": "@readme/eslint-config", | ||
// required for ESM | ||
"rules": { "import/extensions": ["error", "always"] } | ||
"parserOptions": { "ecmaVersion": 2020 } | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/* eslint-disable global-require */ | ||
module.exports = { | ||
alex: require('./alex'), | ||
sentencePunctuation: require('./sentencePunctuation'), | ||
}; |
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,27 +1,19 @@ | ||
import { oas } from '@stoplight/spectral-rulesets'; | ||
const { oas } = require('@stoplight/spectral-rulesets'); | ||
|
||
import alexComponentDescription from './rules/alex-component-description.js'; | ||
import alexComponentSummary from './rules/alex-component-summary.js'; | ||
import alexOperationDescription from './rules/alex-operation-description.js'; | ||
import alexOperationSummary from './rules/alex-operation-summary.js'; | ||
import alexParameter from './rules/alex-parameter.js'; | ||
import alexResponse from './rules/alex-response.js'; | ||
import descriptionSentencePunctuation from './rules/description-sentence-punctuation.js'; | ||
const rules = require('./rules'); | ||
|
||
const config = { | ||
module.exports = { | ||
extends: oas, | ||
rules: { | ||
'alex-component-description': alexComponentDescription, | ||
'alex-component-summary': alexComponentSummary, | ||
'alex-component-description': rules.alexComponentDescription, | ||
'alex-component-summary': rules.alexComponentSummary, | ||
|
||
'alex-operation-description': alexOperationDescription, | ||
'alex-operation-summary': alexOperationSummary, | ||
'alex-operation-description': rules.alexComponentDescription, | ||
'alex-operation-summary': rules.alexOperationSummary, | ||
|
||
'alex-parameter': alexParameter, | ||
'alex-response': alexResponse, | ||
'alex-parameter': rules.alexParameter, | ||
'alex-response': rules.alexResponse, | ||
|
||
'description-sentence-punctuation': descriptionSentencePunctuation, | ||
'description-sentence-punctuation': rules.descriptionSentencePunctuation, | ||
}, | ||
}; | ||
|
||
export default config; |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* eslint-disable global-require */ | ||
module.exports = { | ||
alexComponentDescription: require('./alex-component-description'), | ||
alexComponentSummary: require('./alex-component-summary'), | ||
|
||
alexOperationDescription: require('./alex-operation-description'), | ||
alexOperationSummary: require('./alex-operation-summary'), | ||
|
||
alexParameter: require('./alex-parameter'), | ||
alexResponse: require('./alex-response'), | ||
|
||
descriptionSentencePunctuation: require('./description-sentence-punctuation'), | ||
}; |
5 changes: 3 additions & 2 deletions
5
packages/spectral-config/test/alex-component-description.test.js
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
5 changes: 3 additions & 2 deletions
5
packages/spectral-config/test/alex-operation-description.test.js
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
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
5 changes: 3 additions & 2 deletions
5
packages/spectral-config/test/description-sentence-punctuation.test.js
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