sanity-io / plugin-kit Goto Github PK
View Code? Open in Web Editor NEWEnhanced Sanity.io plugin development experience.
License: MIT License
Enhanced Sanity.io plugin development experience.
License: MIT License
Describe the bug
ESLintIgnoreWarning: The ".eslintignore" file is no longer supported. Switch to using the "ignores" property in "eslint.config.js": https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files
(Use `node --trace-warnings ...` to show where the warning was created)
To Reproduce
Steps to reproduce the behavior:
pnpx @sanity/plugin-kit@latest verify-package
Expected behavior
No warnings. No .eslintignore file should be generated.
Which versions of Sanity are you using?
@sanity/cli (global) 3.14.4 (latest: 3.44.0)
@sanity/incompatible-plugin 1.0.4 (up to date)
@sanity/pkg-utils 6.8.18 (up to date)
@sanity/plugin-kit 4.0.16 (up to date)
sanity 3.44.0 (up to date)
What operating system are you using?
Mac
Which versions of Node.js / npm are you running?
pnpm 9.0.5
Additional context
Add any other context about the problem here.
Security issue?
Any security issues should be submitted directly to [email protected]. In order to determine whether you are dealing with a security issue, ask yourself these two questions:
When a .eslintrc
is used the plugin-kit correctly detects that I have @sanity/no-v2-imports
in my extends
array.
But when using .eslintrc.js
I get this error:
โ 4 problems (3 errors, 1 warning)
ESLint detected Studio V2 imports that are no longer available.
It is recommended configure @sanity/eslint-config-no-v2-imports for ESLint.
Run:
npm install --save-dev @sanity/eslint-config-no-v2-imports
In .eslintrc add:
"extends": ["@sanity/no-v2-imports"]
This way, V2-imports can be identified directly in the IDE, or using eslint CLI.
For more, see https://github.com/sanity-io/eslint-config-no-v2-imports
If the plugin package does not use eslint, disable this check.
To skip this validation add the following to your package.json:
"sanityPlugin": {
"verifyPackage": {
"eslintImports": false
}
}
I have tried multiple times using npx @sanity/plugin-kit init pluginname
, following the wizard, and then when running yarn build
it instantly fails (see screenshot below)
All your plugin docs suggest using this but it doesn't work out of the box, so its not a great starting point! Please could someone take a look?
When running the README.md quick run steps, the package.json doesn't seem to be properly configured.
# Initialize a new plugin (outside of your Sanity studio folder)
npx @sanity/plugin-kit init sanity-plugin-testing-it-out
# Make your plugin linkable, and compile an initial version
cd sanity-plugin-testing-it-out
npm run link-watch
npm run link-watch
produces
[error] `type` in `./package.json` must be of type 'commonjs' | 'module' (received undefined)
"type": "module"
added"exports": {
".": {
"types": "./lib/src/index.d.ts",
"source": "./src/index.ts",
"import": "./lib/index.esm.js",
"require": "./lib/index.js", // Update to .cjs
"default": "./lib/index.esm.js"
},
"main": "./lib/index.js", //update to .cjs
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
Using a curated preset maintained by
These branches will be created by Renovate only once you click their checkbox below.
These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
.github/workflows/format-if-needed.yml
actions/checkout v4
actions/setup-node v4
actions/cache v4
actions/create-github-app-token v1
peter-evans/create-pull-request v6@c5a7806660adbe173f04e3e038b0ccdcd758773c
.github/workflows/main.yml
actions/checkout v4
actions/setup-node v4
actions/checkout v4
actions/setup-node v4
actions/create-github-app-token v1
actions/checkout v4
actions/setup-node v4
assets/inject/semver-workflow/.github/workflows/main.yml
actions/checkout v4
actions/setup-node v4
actions/checkout v4
actions/setup-node v4
actions/checkout v4
actions/setup-node v4
package.json
@rexxars/choosealicense-list 1.1.2
@sanity/pkg-utils 6.10.0
chalk 4.1.2
concurrently 8.2.2
discover-path 1.0.0
email-validator 2.0.4
get-it 8.6.1
get-latest-version 5.1.0
git-remote-origin-url 3.1.0
git-user-info 2.0.3
github-url-to-object 4.0.6
meow 9.0.0
nodemon 3.1.0
npm-packlist 8.0.2
npm-run-path 4.0.1
outdent 0.8.0
p-any 3.0.0
p-props 4.0.0
postcss 8.4.38
spdx-license-ids 3.0.18
xdg-basedir 4.0.0
yalc 1.0.0-pre.53
@commitlint/cli 19.3.0
@commitlint/config-conventional 19.2.2
@sanity/semantic-release-preset 5.0.0
@sanity/ui-workshop ^2.0.15
@types/eslint ^8.56.10
@types/fs-extra ^11.0.4
@types/nodemon ^1.19.6
@types/tap ^15.0.11
@typescript-eslint/eslint-plugin ^7.13.1
@typescript-eslint/parser ^7.13.1
eslint ^8.57.0
eslint-config-prettier ^9.1.0
eslint-config-sanity ^7.1.2
eslint-plugin-prettier ^5.1.3
eslint-plugin-react-hooks ^4.6.2
fs-extra ^11.2.0
json5 2.2.3
prettier ^3.3.2
prettier-plugin-packagejson ^2.5.0
readdirp ^3.6.0
rimraf ^4.4.1
sanity 3.47.0
sinon ^17.0.2
tap ^16.3.10
ts-node ^10.9.2
typescript 5.4.5
eslint >=8.0.0
node >=18
[0] Error: missing package.json
[0] at D:\repos\sanity-smartling\sanity-plugin-smartling\node_modules@sanity\pkg-utils\dist_chunks\watch-86ed07a5.cjs:186:13
[0]
[0] D:\repos\sanity-plugin\sanity-plugin-smartling\node_modules\rxjs\dist\cjs\internal\util\reportUnhandledError.js:13
[0] throw err;
[0] ^
[0]
[0] Error: missing package.json
[0] at D:\repos\sanity-plugin\sanity-plugin-smartling\node_modules@sanity\pkg-utils\dist_chunks\watch-86ed07a5.cjs:186:13
[0] at D:\repos\net-sanity-plugin\sanity-plugin-smartling\node_modules\rxjs\dist\cjs\internal\operators\switchMap.js:17:35
Following the exact steps in the readme
end up in error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.