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

Adds ignorePattern option to max-line-length #2333

Merged
merged 5 commits into from
Feb 16, 2017
Merged

Adds ignorePattern option to max-line-length #2333

merged 5 commits into from
Feb 16, 2017

Conversation

CAYdenberg
Copy link
Contributor

Which issue, if any, is this issue related to?

#2219

Is there anything in the PR that needs further explanation?

Pretty straightforward.

Copy link
Contributor

@davidtheclark davidtheclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nitpicky comment, otherwise looks good! Thanks @CAYdenberg!

Given:

```js
["/^\\@import\\s+/"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need to escape @, do you?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not aware of t@ but it appears you're right.

I changed it in the tests as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 07f4634

@hudochenkov
Copy link
Member

@davidtheclark do you think it should support support RegExp either? I've noticed some of our rule/options, which expect some kind of RegExp, aren't consistent on that matter. Some of them support only string, other support both.

@CAYdenberg
Copy link
Contributor Author

@hudochenkov The example (at-rule-empty-line-before) only applies to @ rules ... I think this should be more flexible since there are other places you might want it. Someone might want "/linear-gradient/" for example.

@davidtheclark
Copy link
Contributor

it should support support RegExp either

@hudochenkov: Can you please try to rephrase this question? It's not clear to me what you're asking.

Regarding the inconsistencies — yeah, there are a lot of rules :) If you would like to add regexp support to any options that only support strings, please open an issue or submit a PR — I usually can't think of a reason not to enable regexps.

@hudochenkov
Copy link
Member

@davidtheclark sorry :) I wanted to know if ignorePattern should support RegExp additional to string. Now I see that it should support both types.

@jeddy3 jeddy3 merged commit 50ed9cd into stylelint:master Feb 16, 2017
@jeddy3
Copy link
Member

jeddy3 commented Feb 16, 2017

@CAYdenberg Thanks!

Changelog updated:

  • Added: ignorePattern option to max-line-length (#2333).

@CAYdenberg CAYdenberg deleted the caydenberg_issue_2219 branch February 17, 2017 16:31
m-allanson added a commit that referenced this pull request Feb 22, 2017
* master: (107 commits)
  Update jest to the latest version 🚀 (#2372)
  fix(package): update known-css-properties to version 0.0.7
  chore(package): update eslint to version 3.16.0
  Update CHANGELOG.md
  Add support for async rules (#2351)
  Prepare 7.9.0
  Add a test for a parent selector in no-duplicate-selectors (#2364)
  Update CHANGELOG.md
  Add ignorePattern option to max-line-length (#2333)
  no-browser-hacks: link to external plugin (#2365)
  Update CHANGELOG.md
  Fix placeholder selector case (#2360)
  Always exclude ignored globs from globby search. (#2355)
  Update CHANGELOG.md
  Update lodash (#2353)
  Update CHANGELOG.md
  Add ignoreFontFamilyName option to font-family-no-duplicate (#2314)
  Tests: added tests for nested selectors in `selector-id-pattern` rule. (#2345)
  Fix brace position (#2347)
  Update CHANGELOG.md
  ...

# Conflicts:
#	.gitignore
hudochenkov added a commit that referenced this pull request Feb 23, 2017
* master: (31 commits)
  Update stylehacks and snapshot
  Update jest to the latest version 🚀 (#2372)
  fix(package): update known-css-properties to version 0.0.7
  chore(package): update eslint to version 3.16.0
  Update CHANGELOG.md
  Add support for async rules (#2351)
  Prepare 7.9.0
  Add a test for a parent selector in no-duplicate-selectors (#2364)
  Update CHANGELOG.md
  Add ignorePattern option to max-line-length (#2333)
  no-browser-hacks: link to external plugin (#2365)
  Update CHANGELOG.md
  Fix placeholder selector case (#2360)
  Always exclude ignored globs from globby search. (#2355)
  Update CHANGELOG.md
  Update lodash (#2353)
  Update CHANGELOG.md
  Add ignoreFontFamilyName option to font-family-no-duplicate (#2314)
  Tests: added tests for nested selectors in `selector-id-pattern` rule. (#2345)
  Fix brace position (#2347)
  ...

# Conflicts:
#	CHANGELOG.md
sergesemashko pushed a commit to sergesemashko/stylelint that referenced this pull request Mar 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants