Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrades and stuff #150

Merged
merged 6 commits into from
Feb 16, 2024
Merged
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
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ Issue: #

## What Changed

<!-- Insert a description below. Don't forget to run `yarn update-all` to update configuration files and their documentation! -->
<!-- Insert a description below. Don't forget to run `pnpm run update-all` to update configuration files and their documentation! -->

## Checklist

Check the ones applicable to your change:

- [ ] Ran `yarn update-all`
- [ ] Ran `pnpm run update-all`
- [ ] Tests are updated
- [ ] Documentation is updated

Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/linear-export.yml

This file was deleted.

11 changes: 4 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ jobs:
- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js 14.x
uses: actions/setup-node@v1
- uses: pnpm/action-setup@v3
with:
node-version: 14.x

- name: Install dependencies
uses: bahmutov/npm-install@v1
version: 8
run_install: true

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn release
pnpm run release
12 changes: 5 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Install dependencies
uses: bahmutov/npm-install@v1
- uses: pnpm/action-setup@v3
with:
version: 8
run_install: true

- name: Run tests
run: |
yarn test:ci
pnpm run test:ci
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## Table of Contents

- [1. About the Project](#about-the-project)
- [2. Getting Started](#getting-started)
- [2.1. Creating a new rule](#creating-a-new-rule)
- [2.1.1. Important metadata for a rule](#important-metadata-for-a-rule)
- [2.2. Testing rules](#testing-rules)
- [2.3. Updating configs or documentation](#updating-configs-or-documentation)
- [3. Useful resources](#useful-resources)
- [About the project](#about-the-project)
- [Getting started](#getting-started)
- [Creating a new rule](#creating-a-new-rule)
- [Important metadata for a rule](#important-metadata-for-a-rule)
- [Testing rules](#testing-rules)
- [Updating configs or documentation](#updating-configs-or-documentation)
- [Useful resources](#useful-resources)

# About the project

Expand All @@ -21,7 +21,7 @@ First of all, thank you so much for taking the time to contribute to this projec
Run the following command and answer the prompts:

```sh
yarn generate-rule
pnpm run generate-rule
```

This command will generate the rule file, tests as well as the documentation page.
Expand Down Expand Up @@ -56,7 +56,7 @@ module.exports = {
Run the following command for testing the rules:

```sh
yarn test --watch
pnpm run test --watch
```

If you want to run tests for a particular rule and skip the rest, you can do so like this:
Expand Down
5 changes: 4 additions & 1 deletion docs/rules/no-uninstalled-addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ module.exports = {
rules: {
'storybook/no-uninstalled-addons': [
'error',
{ packageJsonLocation: './folder/package.json', ignore: ['custom-addon'] },
{
packageJsonLocation: './folder/package.json',
ignore: ['custom-addon'],
},
],
},
}
Expand Down
2 changes: 1 addition & 1 deletion lib/configs/addon-interactions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* IMPORTANT!
* This file has been automatically generated,
* in order to update it's content execute "yarn update-all"
* in order to update it's content execute "pnpm run update-all"
*/
export = {
plugins: ['storybook'],
Expand Down
2 changes: 1 addition & 1 deletion lib/configs/csf-strict.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* IMPORTANT!
* This file has been automatically generated,
* in order to update it's content execute "yarn update-all"
* in order to update it's content execute "pnpm run update-all"
*/
export = {
extends: require.resolve('./csf'),
Expand Down
2 changes: 1 addition & 1 deletion lib/configs/csf.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* IMPORTANT!
* This file has been automatically generated,
* in order to update it's content execute "yarn update-all"
* in order to update it's content execute "pnpm run update-all"
*/
export = {
plugins: ['storybook'],
Expand Down
2 changes: 1 addition & 1 deletion lib/configs/recommended.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* IMPORTANT!
* This file has been automatically generated,
* in order to update it's content execute "yarn update-all"
* in order to update it's content execute "pnpm run update-all"
*/
export = {
plugins: ['storybook'],
Expand Down
3 changes: 3 additions & 0 deletions lib/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export const getDescriptor = (
switch (type) {
case 'ArrayExpression':
return property.value.elements.map((t) => {
if (t === null) {
throw new Error(`Unexpected descriptor element: null`)
}
if (!['StringLiteral', 'Literal'].includes(t.type)) {
throw new Error(`Unexpected descriptor element: ${t.type}`)
}
Expand Down
92 changes: 46 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
"eslint-plugin",
"storybook"
],
"homepage": "https://github.com/storybookjs/eslint-plugin-storybook#readme",
"bugs": {
"url": "https://github.com/storybookjs/eslint-plugin-storybook/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/storybookjs/eslint-plugin-storybook"
},
"license": "MIT",
"author": "[email protected]",
"contributors": [
{
Expand All @@ -20,71 +29,62 @@
"dist/**/*",
"README.md"
],
"repository": {
"type": "git",
"url": "https://github.com/storybookjs/eslint-plugin-storybook"
},
"homepage": "https://github.com/storybookjs/eslint-plugin-storybook#readme",
"bugs": {
"url": "https://github.com/storybookjs/eslint-plugin-storybook/issues"
},
"scripts": {
"lint": "eslint --fix .",
"migrate": "ts-migrate-full",
"prebuild": "rimraf dist",
"build": "tsc",
"generate-rule": "ts-node ./tools/generate-rule",
"lint": "eslint --fix .",
"migrate": "ts-migrate-full",
"prepare": "husky install",
"prettier": "prettier --write .",
"release": "pnpm run build && auto shipit",
"start": "tsc --watch",
"test": "jest",
"test:ci": "tsc --noEmit && jest --ci",
"generate-rule": "ts-node ./tools/generate-rule",
"update-all": "pnpm run update-configs && pnpm run update-docs",
"update-configs": "ts-node ./tools/update-configs",
"update-docs": "ts-node ./tools/update-rules-list",
"update-all": "yarn update-configs && yarn update-docs",
"prepare": "husky install",
"prettier": "prettier --write .",
"release": "yarn build && auto shipit"
"update-docs": "ts-node ./tools/update-rules-list"
},
"lint-staged": {
"*.js": "eslint --cache --fix",
"*.{js,css,md}": "prettier --write"
},
"dependencies": {
"@storybook/csf": "^0.0.1",
"@typescript-eslint/utils": "^5.45.0",
"requireindex": "^1.1.0",
"@typescript-eslint/utils": "^5.62.0",
"requireindex": "^1.2.0",
"ts-dedent": "^2.2.0"
},
"devDependencies": {
"@auto-it/released": "^10.32.2",
"@types/eslint": "^7.28.2",
"@types/jest": "^27.0.2",
"@types/node": "^16.11.6",
"@types/requireindex": "^1.2.0",
"@typescript-eslint/eslint-plugin": "^5.47.1",
"@typescript-eslint/parser": "^5.3.0",
"auto": "^10.32.2",
"eslint": "^7.1.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-eslint-plugin": "^3.2.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": ">=6",
"jest": "^27.3.1",
"lint-staged": ">=10",
"prettier": "^2.4.0",
"@auto-it/released": "^11.0.4",
"@types/eslint": "^8.56.2",
"@types/jest": "^29.5.12",
"@types/node": "^18.19.17",
"@types/requireindex": "^1.2.4",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"auto": "^11.0.4",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-eslint-plugin": "^5.3.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.1.3",
"husky": "^9.0.11",
"jest": "^29.7.0",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"prompts": "^2.4.2",
"rimraf": "^3.0.2",
"ts-jest": "^27.0.7",
"ts-migrate": "^0.1.26",
"ts-node": "^10.4.0",
"typescript": "^4.9.3"
},
"engines": {
"node": "12.x || 14.x || >= 16"
"ts-jest": "^29.1.2",
"ts-migrate": "^0.1.35",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
},
"peerDependencies": {
"eslint": ">=6"
},
"license": "MIT",
"lint-staged": {
"*.js": "eslint --cache --fix",
"*.{js,css,md}": "prettier --write"
"engines": {
"node": ">= 18"
},
"publishConfig": {
"access": "public"
Expand Down
Loading
Loading