Skip to content

Commit daacab0

Browse files
author
Alexander Kamushkin
committed
fix test - remove invalid octals
1 parent 43c417c commit daacab0

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

tests/linting/eslint/rules/file-permissions.test.ts

+2-18
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ let tests = {
3232
fs.chmodSync("/tmp/fs", 0o770); // Compliant -rwxrwx---
3333
fs.chmodSync("/tmp/fs", 0o70); // Compliant ----rwx---
3434
fs.chmodSync("/tmp/fs", 0o0); // Compliant ----------
35-
fs.chmodSync("/tmp/fs", 00770); // Compliant -rwxrwx---
36-
fs.chmodSync("/tmp/fs", 0770); // Compliant -rwxrwx---
37-
fs.chmodSync("/tmp/fs", 070); // Compliant ----rwx---
38-
fs.chmodSync("/tmp/fs", 00); // Compliant ----------
3935
4036
fs.chmodSync("/tmp/fs", "0770"); // Compliant -rwxrwx---
4137
fs.chmodSync("/tmp/fs", "770"); // Compliant -rwxrwx---
@@ -74,9 +70,6 @@ let tests = {
7470
process.umask(0o007); // Compliant
7571
process.umask(0o07); // Compliant
7672
process.umask(0o7); // Compliant
77-
process.umask(0007); // Compliant
78-
process.umask(007); // Compliant
79-
process.umask(07); // Compliant
8073
8174
// String
8275
process.umask("0777"); // Compliant
@@ -183,13 +176,8 @@ let tests = {
183176
fs.chmodSync("/tmp/fs", 0o007); // Sensitive -------rwx
184177
fs.chmodSync("/tmp/fs", 0o07); // Sensitive -------rwx
185178
fs.chmodSync("/tmp/fs", 0o7); // Sensitive -------rwx
186-
fs.chmodSync("/tmp/fs", 00777); // Sensitive -------rwx
187-
fs.chmodSync("/tmp/fs", 00007); // Sensitive -------rwx
188-
fs.chmodSync("/tmp/fs", 0007); // Sensitive -------rwx
189-
fs.chmodSync("/tmp/fs", 007); // Sensitive -------rwx
190-
fs.chmodSync("/tmp/fs", 07); // Sensitive -------rwx
191179
`,
192-
errors: 11,
180+
errors: 6,
193181
},
194182
{
195183
code: `
@@ -271,10 +259,6 @@ let tests = {
271259
process.umask(0o022); // Sensitive
272260
process.umask(0o22); // Sensitive
273261
process.umask(0o2); // Sensitive
274-
process.umask(0000); // Sensitive
275-
process.umask(0022); // Sensitive
276-
process.umask(022); // Sensitive
277-
process.umask(02); // Sensitive
278262
279263
// String
280264
process.umask("0000"); // Sensitive
@@ -288,7 +272,7 @@ let tests = {
288272
process.umask(0); // Sensitive 0o000
289273
process.umask(18); // Sensitive 0o022
290274
`,
291-
errors: 16,
275+
errors: 12,
292276
},
293277
{
294278
code: `

0 commit comments

Comments
 (0)