Closed dcro closed 7 years ago
We can support .stylelintignore
base #221
@morishitter what do you think?
@gucong3000 I've installed that fork and ran a test but it also modified files which stylelint ignores.
My directory setup is similar to the following:
root
└─ .stylelintrc
└─ .stylelintignore
└─ assets/
└─ sass/
└─ file1.scss
└─ file2.scss
└─ third-party/
└─ third-party-1.scss
└─ third-party-2.scss
.stylelintignore
is configured to ignore everything under assets/sass/third-party
as those files come from a third-party provider and I need to keep them unchanged to be able to easily update them an track the changes each update introduces.
My .stylelintignore
file reads:
# .stylelintignore
assets/sass/third-party
To test this, I've ran the following in the root:
# Stylelint command works correctly, ignores assets/sass/third-party directory
node_modules/stylelint/dist/cli.js 'assets/sass/**/*.scss'
# Stylefmt command does not ignore files in the assets/sass/third-party directory
node_modules/stylefmt/bin/cli.js -R 'assets/sass/'
@dcro Wait a minute, I'll create a new branch.
@dcro try this branch:
npm i gucong3000/stylefmt#ignore_support --save-dev
This latest branch works great, it ignored all the files it was supposed to and it processed the rest.
My wife will have a baby tomorrow, I will come back a month later.
Support in PR #231
@dcro #231 was merged, Please test your project.
npm i morishitter/stylefmt --save-dev
This seems to run great on the latest version (5.0.2). Thank you for all your help!
stylefmt does not currently support stylelint's
.stylelintignore
file that specifies which files should be excluded from linting.It would be great to have the ability to ignore some files when doing a recursive fix, either by automatically parsing any existing
.stylelintignore
file or by supporting a.stylefmtignore
file.