Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Ability to specify configuration at the top of a file #487

Closed
mikesherov opened this issue Jun 30, 2014 · 6 comments
Closed

Ability to specify configuration at the top of a file #487

mikesherov opened this issue Jun 30, 2014 · 6 comments
Milestone

Comments

@mikesherov
Copy link
Contributor

e.g.

/* jscs: {maximumLineLength: 80, requireSpacesAfterLineComment: true} */
... rest of file

Important to note that this only allows configuration at the top of a file and applies to the whole file. There are currently no plans to allow inline re-configuration of rules, only inline ignoring of current rules as per #486 and #20

@caillou
Copy link

caillou commented Jul 1, 2014

+1

@mikesherov mikesherov changed the title Ability to specific configuration at the top of a file Ability to specify configuration at the top of a file Jul 6, 2014
mrjoelkemp added a commit to mrjoelkemp/node-jscs that referenced this issue Jul 8, 2014
mrjoelkemp added a commit to mrjoelkemp/node-jscs that referenced this issue Jul 8, 2014
mrjoelkemp added a commit to mrjoelkemp/node-jscs that referenced this issue Jul 10, 2014
mrjoelkemp added a commit to mrjoelkemp/node-jscs that referenced this issue Jul 10, 2014
@markelog
Copy link
Member

What is the use-case?

@mikesherov
Copy link
Contributor Author

The use case is parity with every other linter in the ecosystem and portability of code into other codebases. Not everyone uses build tools like Grunt that bake in per file config.

mrjoelkemp added a commit to mrjoelkemp/node-jscs that referenced this issue Jul 16, 2014
mrjoelkemp added a commit to mrjoelkemp/node-jscs that referenced this issue Jul 16, 2014
mrjoelkemp added a commit to mrjoelkemp/node-jscs that referenced this issue Jul 16, 2014
mrjoelkemp added a commit to mrjoelkemp/node-jscs that referenced this issue Jul 16, 2014
@gasolin
Copy link

gasolin commented Jul 17, 2014

worth to mention that jshint also support such kind of file-wide configuration to allow exclude some policy for legacy code http://www.jshint.com/docs/options/#freeze

mrjoelkemp added a commit to mrjoelkemp/node-jscs that referenced this issue Jul 17, 2014
mrjoelkemp added a commit to mrjoelkemp/node-jscs that referenced this issue Jul 17, 2014
@mrjoelkemp
Copy link
Member

Folks, I now have a working implementation that's ready for review. #513

mrjoelkemp added a commit to mrjoelkemp/node-jscs that referenced this issue Jul 17, 2014
@mikesherov
Copy link
Contributor Author

Closing this. Please read the last comment on #513 . Once inline disable / re-enable is live for a bit, we'll see if this is still necessary.

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

Successfully merging a pull request may close this issue.

5 participants