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

Padrão de Código-Fonte #20

Closed
wandersonwhcr opened this issue Aug 23, 2017 · 4 comments
Closed

Padrão de Código-Fonte #20

wandersonwhcr opened this issue Aug 23, 2017 · 4 comments
Assignees
Milestone

Comments

@wandersonwhcr
Copy link
Owner

Necessita-se aplicar um padrão de formatação de código-fonte, como, por exemplo, o Standard.

https://github.com/standard/standard

@wandersonwhcr wandersonwhcr self-assigned this Aug 23, 2017
@wandersonwhcr
Copy link
Owner Author

Após aplicar o standard, nota-se que ele é muito fraco. Entende-se que padrões de código-fonte devem verificar, inclusive, a definição de variáveis com var, const e let.

Após busca sobre outras padronizações, encontrou-se o eslint, pacote que possibilita a inclusão de verificadores. Entende-se que o estilo do Airbnb pode ser interessante.

https://github.com/airbnb/javascript

@wandersonwhcr
Copy link
Owner Author

Para integrar o eslint no Mocha, deve-se utilizar o pacote abaixo.

https://www.npmjs.com/package/mocha-eslint

@wandersonwhcr
Copy link
Owner Author

Também devo utilizar um linter de arquivos JSON.

@wandersonwhcr
Copy link
Owner Author

Como não temos, ainda, arquivos JSON diferentes dos padrões (package.json ou .eslintrc.json), então não vamos adicionar o plugin. Se algum destes arquivos possuir erros, então nada funcionará.

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

No branches or pull requests

1 participant