Comments (12)
I removed npm run build
from npm test
because tests (especially in travis) should run against compiled dot files in the repo rather then recompile them - many users are likely not to run tests / recompile dot files.
I think linting in script is a good idea - it will prevent some code errors from being comitted - at the moment it only happens in code-climate and there is a file that turns off the rules I intentionally break.
I don't like standard
though - although with some things it enforces I agree, it's opinionated differently from me :) and not configurable. I disagree about not using semicolons - not only consistently using them prevents some errors but also, for example, };
vs }
helps understand what this brace belongs to. I also disagree about always using '===' - I have many arguments for always using '==' unless you know that you definitely need '==='. I almost never use braces around single statements after if
and for
- for example, I prefer for (var key in schema) if (rules[key]) return true;
to for (var key in schema) { if (rules[key]) { return true; } }
... I know that many people think differently and quote Crockford. I prefer Flanagan's approach to JS :)
So I'm happy with any tool as long as it supports options from .jshintrc
.
from ajv.
@epoberezkin Fair enough, not sure I agree. Normally I'd avoid checking in any compiled files though and I'd just publish them using the npm prepublish
step.
I'll look into a linting solution later for you. Shouldn't be difficult just to use jshint
and all the newer projects tend to use eslint
now too.
from ajv.
Removing them completely is ok, I think. I didn't understand that it is what you suggest as they were still there. It will guarantee they are not old.
It also makes tracking changes a bit easier too. I will do it.
jshint is ok, definitely.
from ajv.
It's ok, I don't think I had made that suggestion yet. But yeah, I normally just prepublish and run it on build, and keep compiled pieces out of the source code.
from ajv.
@epoberezkin It looks like the current build in npm, 1.1.0, is broken, at least for use with webpack. I got errors like Error: Cannot resolve 'file' or 'directory' ../dotjs
... when bundling. Fixed through cd node_modules//ajv/ && npm install
. I guess the prepublish script should have done this but instead the dotjs folder had only the readme.
from ajv.
Can confirm. This is a result of, when you don't specify the files to publish, it uses .gitignore
. I'll make a PR now with the folder we need.
from ajv.
Fixed with #37.
from ajv.
thank you, I published 1.1.1
from ajv.
@blakeembrey should https://github.com/mulesoft-labs/osprey-method-handler/blob/master/package.json#L41 be changed to ^1.1.1? Or what is it better to do with that broken 1.1.0?
from ajv.
@epoberezkin You can unpublish 1.1.0
. I'll update that module once I use JSON pointers most likely.
from ajv.
Thanks 👍
from ajv.
:)
from ajv.
Related Issues (20)
- Ref within def does not act consistently
- JSONSchemaType $ref doesn't work in array type. HOT 5
- oneOf returns unwanted errors HOT 1
- Description key set as boolean returns error that it must be string HOT 2
- Validate and infer JSON Schema validated data type: introducing type providers HOT 3
- JTD schema parser errors on empty properties field HOT 1
- Implement x-inOrder subschema for in order or sequential processing HOT 3
- additionalProperties shouldn't affect TypeScript types from JTDDataType HOT 2
- option compile from addKeyword doesn't change on a remove and then add again
- OneOf validation issue HOT 1
- Cannot find module 'ajv/dist/compile/codegen' HOT 2
- How can I make a property value depend on the value of another property? HOT 1
- Error using multipleOf with decimals HOT 1
- Using if/then/else fails validation HOT 1
- compileParser does not appear to support properties with type `field?: Record<string, unknown>` via `JTDSchemaType`. HOT 2
- Integers as Discriminators HOT 7
- How can I access `definitions` in schema-store using `$ref`?
- DeprecationWarning: The punycode module is deprecated #96 HOT 2
- `maxLength` constraint checking seems to not code (Hindi) unicode characters properly HOT 7
- ajv 8.13.0 upgrade doesn't work with ajv-formats 3.0.1 with TypeScript HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ajv.