vscode-react-native icon indicating copy to clipboard operation
vscode-react-native copied to clipboard

Package.json gives a warning for "name"

Open vsccarl opened this issue 10 years ago • 4 comments

Intellisense for package.json is showing a warning for the name of my project that it does not match some Regex pattern that is required.

reactjson

Expected: The package name should not have warnings

vsccarl avatar Mar 15 '16 00:03 vsccarl

By default, vscode uses the json schema from http://json.schemastore.org/package for validating package.json files. The validation specified there states that package names must not include capital letters, which is why it is complaining.

If you want to override the schema that vscode uses for validation, you can refer to https://code.visualstudio.com/Docs/languages/json#_json-schemas-settings for how to override the default schema.

MSLaguana avatar Mar 15 '16 00:03 MSLaguana

@MSLaguana Maybe we should have the extension override the schema. A lot of users are going to run into this behavior, if we want to support React-Native inside VS Code we shouldn't show an error on that file if there isn't one. What do you think?

digeff avatar Mar 15 '16 17:03 digeff

Closing as this is an external issue related to the schema - it can be ignored or renamed as appropriate.

ghost avatar Mar 15 '16 18:03 ghost

In tsconfig.json add this line or set its value to false. This worked for me.

"forceConsistentCasingInFileNames": false, // Fix for name regex pattern

Dragan994 avatar Jan 31 '22 02:01 Dragan994