jscs-dev / node-jscs

:arrow_heading_up: JavaScript Code Style checker (unmaintained)
https://jscs-dev.github.io
MIT License
4.97k stars 515 forks source link

Add rule to forbid usage of unknown globals #2200

Closed Alexsey closed 8 years ago

Alexsey commented 8 years ago

It would be a grate mechanism of early error detection and ability to control the usage of global scope in project

hzoo commented 8 years ago

Sounds similar to http://eslint.org/docs/rules/no-undef

We released 3.0 recently! We also wrote a post about how 3.0 will be our last major release (since we are deprecating the project) and that we are merging with ESLint!

Thus we won't be working on any new features moving forward which includes new rules/options. We will continue to fix bugs and work on CST/better autofixing for current rules in the upcoming months both to help JSCS users and to gain experience that we can hopefully use in ESLint. But otherwise we both teams will be working on getting ESLint feature parity with JSCS and just a nice transition for our users.

I'm putting an orphaned label to note this issue isn't planned to be worked on, but might be a good contribution as a custom rule (not in JSCS core itself).

I would encourage anyone who wants the rule to try writing it themselves: I would either write a custom rule or submit an issue to ESLint and if accepted a PR. Otherwise a custom rule that won't be in core repo itself.

JSCS rules are also very similar to ESLint rules: here are some resources to get started: