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

fix: disable unicorn/prefer-at [no issue] #211

Merged
merged 4 commits into from
Dec 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ foo.match(/^bar/) != null;
// eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with, unicorn/prefer-string-starts-ends-with
/^bar/.test(foo);

// eslint-disable-next-line unicorn/prefer-at, @typescript-eslint/prefer-string-starts-ends-with, @typescript-eslint/no-unused-expressions
// eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with, @typescript-eslint/no-unused-expressions
foo[foo.length - 1] === 'b';
// eslint-disable-next-line unicorn/prefer-at, @typescript-eslint/prefer-string-starts-ends-with, @typescript-eslint/no-unused-expressions
// eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with, @typescript-eslint/no-unused-expressions
foo.charAt(foo.length - 1) === 'b';
// eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with, @typescript-eslint/no-unused-expressions
foo.lastIndexOf('bar') === foo.length - 3;
Expand Down
2 changes: 1 addition & 1 deletion @ornikar/eslint-config/rules/unicorn.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ const formTree = shallow(tree.find(x => FormWithApiCall(x)).prop('children')());
'unicorn/prefer-module': 'off',

// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-at.md
'unicorn/prefer-at': 'error',
'unicorn/prefer-at': 'off',

// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-empty-file.md
'unicorn/no-empty-file': 'off',
Expand Down
31 changes: 0 additions & 31 deletions @ornikar/eslint-config/tests/prefer-at.js

This file was deleted.