Skip to content

Commit 72e322e

Browse files
committed
chore(eslint): fixes eslint in @casl/ability
Also converts arrow function style stuff to be warnings
1 parent 4cbef78 commit 72e322e

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

.eslintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"no-mixed-operators": 0,
1111
"no-prototype-builtins": 0,
1212
"no-confusing-arrow": 0,
13-
"no-bitwise": ["error", { "allow": ["^"] }]
13+
"no-bitwise": ["error", { "allow": ["^"] }],
14+
"no-return-assign": 1,
15+
"arrow-body-style": 1
1416
}
1517
}

packages/casl-ability/spec/rules_to_fields.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ describe('rulesToFields', () => {
3434
can('read', 'Post', { 'state.private': true })
3535
})
3636
const object = rulesToFields(ability, 'read', 'Post')
37-
console.log(object)
3837

3938
expect(object).to.deep.equal({
4039
id: 5,

packages/casl-ability/src/extra.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getByPath, setByPath } from './utils';
1+
import { setByPath } from './utils';
22

33
export function rulesToQuery(ability, action, subject, convert) {
44
const query = {};

packages/casl-ability/src/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ export function wrapArray(value) {
33
}
44

55
export function setByPath(object, path, value) {
6-
let ref = object
7-
let lastKey = path
6+
let ref = object;
7+
let lastKey = path;
88

99
if (path.indexOf('.') !== -1) {
1010
const keys = path.split('.');

0 commit comments

Comments
 (0)