Giter VIP home page Giter VIP logo

eslint-closure's People

Contributors

jschaf avatar kolorful avatar ronapelbaum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

eslint-closure's Issues

Yarn workspaces

I noticed that there are Makefile's in the repo that just symlink dependencies within the repo with yarn.

In yarn@>=1, the workspaces feature will do the same thing.

If welcome, I can submit a PR that drops use of the Makefiles in favor of the workspaces feature.

don't know what I should add to support the `new` type

Question

The linter throws an error of type new unknow.
How could I config the eslint to support this type?

type reference

function-new-type

error

Syntax error in type: {new(source: {documents: Map<string, D>}): DListConstructor} jsdoc/valid-types

.eslintrc config

{
    "plugins": [
        "jsdoc",
        "closure"
    ],
    "env": {
        "es6": true
    },
    "rules": {
        "jsdoc/check-param-names": 1,
        "jsdoc/check-tag-names": 1,
        "jsdoc/check-types": 1,
        "jsdoc/newline-after-description": 1,
        "jsdoc/require-description-complete-sentence": 1,
        "jsdoc/require-param": 1,
        "jsdoc/require-param-type": 1,
        "jsdoc/require-returns-type": 1,
        "jsdoc/valid-types": 1
    },
    "settings": {
        "jsdoc": {
            "additionalTagNames": {
                "customTags": ["template"]
            }
        }
    }
}

the comment

/**
 * @param {{new(source: {documents: Map<string, D>}): DListConstructor}} ObjectiveClass
 */

Cannot find module './dist/closure-eslint-plugin'

After I added

    "eslint-closure": "^0.0.1",
    "eslint-plugin-closure": "^0.0.1",
    "eslint-config-closure-base": "^0.0.1",
    "eslint-config-closure-es5": "^0.0.1",
    "eslint-config-closure-es6": "^0.0.1"

into package.json and did npm install. When I do npm run lint (with closure-base config), it says:

Cannot find module './dist/closure-eslint-plugin'
Error: Cannot find module './dist/closure-eslint-plugin'
    at Function.Module._resolveFilename (module.js:440:15)
    at Function.Module._load (module.js:388:25)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/xxx/xxx/xxx/node_modules/eslint-plugin-closure/index.js:15:18)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)

I looked at node_modules/eslint-plugin-closure/ and there is no dist folder in there.

Could you add some instructions in the README file to illustrate how to config this with eslint?

Thanks!

better output for 'closure/no-undef' rule

when using this rule with namespace pattern:

goog.require('ns.A');
ns.A();
ns.B();

in that case we'll get 'ns' is not defined..

IMO it will be very helpful to get the full name.

Not sure about how to use the plugin

Hi,

I tried to use this plugin following the next steps:
npm i -D eslint-plugin-closure

Modified .eslintrc.json
.eslintrc.json:

{
  ...
  "extends": ["closure"],
  ...
}

But when I tried to run eslint, it shows the message:

Cannot find module 'eslint-config-closure'

I also tried using "closure-es6", "closure-base", "plugin:closure" but none of them worked.

It would be great to have documentation about the right way to use this plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.