webaverse / xrpackage

XR (VR+AR) web object packaging core API
https://xrpackage.org/
24 stars 10 forks source link

Add ESLint config #32

Open avaer opened 4 years ago

avaer commented 4 years ago

We use roughly semistandard code style in the Webaverse repos but it's not enforced with eslint.

Is seems sensible to cook an eslint file into the repo.

Coming from https://github.com/webaverse/xrpackage/pull/31.

shu8 commented 4 years ago

With the refactoring of this repo almost complete, it would be nice to decide on a decent ESLint config for Webaverse projects.

The main additions to the semistandard code style that I can see we use are trailing commas, so would an ESLint config like:

{
    "extends": "semistandard",
    "rules": {
        "comma-dangle": ["error", "always"]
    },
    "env": {
        "browser": true // or `"node": true `, for different projects
    }
}

work for us, throughout Webaverse?