dolsem / eslint-plugin-filename-rules

MIT License
36 stars 8 forks source link

Possible to pass array of aliases? #7

Closed reintroducing closed 1 year ago

reintroducing commented 3 years ago

I think it would be great if you could do something like this:

module.exports = {
    plugins: ['filename-rules'],
    rules: {
        'filename-rules/match': [2, {'.js': ['camelCase', 'PascalCase']}],
    },
};

Any chance of supporting that?

dolsem commented 3 years ago

Would this allow both options? If so, you can currently do this with a custom regex, just combine the two predefined ones with an or. But I am accepting PRs if someone wants to add this.