Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix *.vue and eslint #13

Closed
kerphi opened this issue Oct 10, 2016 · 5 comments
Closed

Fix *.vue and eslint #13

kerphi opened this issue Oct 10, 2016 · 5 comments

Comments

@kerphi
Copy link
Contributor

kerphi commented Oct 10, 2016

Voici ce que j'obtiens qd j'essayer de linter les fichier vue :( Une idée ?

> [email protected] lint /app
> eslint --ext=.js,.vue ./routes/ ./middlewares/ ./test/ ./lib/ ./public/src/


/app/public/src/components/add-apps.vue
  3:8  error  Parsing error: Unexpected token is

/app/public/src/components/add-instance.vue
  3:8  error  Parsing error: Unexpected token is

/app/public/src/components/apps.vue
  1:1  error  Parsing error: Unexpected token <

/app/public/src/components/infos-machine-table.vue
  3:8  error  Parsing error: Unexpected token is

/app/public/src/components/table.vue
  3:8  error  Parsing error: Unexpected token is

✖ 5 problems (5 errors, 0 warnings)
@kerphi
Copy link
Contributor Author

kerphi commented Oct 10, 2016

Au passage, j'ai mis à jour le wrapper du makefile (make lint) pour qu'il appel explicitement npm run lint

@parmentf
Copy link
Contributor

De tête je ne sais pas te répondre, mais à mon avis, il faut voir comment j'ai configuré estlint dans lodex.
Sûrement une configuration particulière pour les components.

@parmentf
Copy link
Contributor

parmentf commented Oct 11, 2016

C'est ça: https://github.com/Inist-CNRS/lodex/blob/master/app/components/.eslintrc.js

module.exports = {
    "env": {
        "browser": true,
        "es6": true
    },
    "extends": "vue",
    "rules": {
        "brace-style": [
            "error",
            "stroustrup",
            { "allowSingleLine": true }
        ],
        "indent": [
            "error",
            2
        ],
        "linebreak-style": [
            "error",
            "unix"
        ],
        "quotes": [
            "error",
            "single"
        ],
        "semi": [
            "error",
            "never"
        ]
    }
};

Oh, et il faut sans doute ajouter quelques dépendences de dev: https://github.com/Inist-CNRS/lodex/blob/master/package.json#L120-L122

    "eslint-config-vue": "^1.1.0",
    "eslint-plugin-html": "^1.5.3",
    "eslint-plugin-vue": "^0.1.1",

@parmentf
Copy link
Contributor

Fixed by @21a7574

@kerphi
Copy link
Contributor Author

kerphi commented Oct 11, 2016

Merci François !

Le mar. 11 oct. 2016 10:19, François Parmentier [email protected]
a écrit :

Closed #13 #13.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#13 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAUCNKUBPTQvmF0hmKaT5oESxJaVTS8qks5qy0Z_gaJpZM4KS8r3
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants