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

ESLint: Enable 'dot-notation' rule #2576

Merged
merged 1 commit into from
May 22, 2020
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
5 changes: 3 additions & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ rules:
default-case: off
default-case-last: error
default-param-last: error
dot-notation: off
dot-notation: error
eqeqeq: [error, smart]
grouped-accessor-pairs: error
guard-for-in: error
Expand Down Expand Up @@ -583,6 +583,7 @@ overrides:

# Disable conflicting ESLint rules and enable TS-compatible ones
default-param-last: off
dot-notation: off
lines-between-class-members: off
no-array-constructor: off
no-dupe-class-members: off
Expand All @@ -594,6 +595,7 @@ overrides:
require-await: off
no-return-await: off
'@typescript-eslint/default-param-last': error
'@typescript-eslint/dot-notation': error
'@typescript-eslint/lines-between-class-members':
[error, always, { exceptAfterSingleLine: true }]
'@typescript-eslint/no-array-constructor': error
Expand All @@ -608,7 +610,6 @@ overrides:
'@typescript-eslint/return-await': error

# Disable for JS, Flow and TS
'@typescript-eslint/dot-notation': off # TODO consider
'@typescript-eslint/init-declarations': off
'@typescript-eslint/no-magic-numbers': off
'@typescript-eslint/no-use-before-define': off
Expand Down
2 changes: 1 addition & 1 deletion resources/gen-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const labelsConfig = {
fold: true,
},
};
const GH_TOKEN = process.env['GH_TOKEN'];
const { GH_TOKEN } = process.env;

if (!GH_TOKEN) {
console.error('Must provide GH_TOKEN as environment variable!');
Expand Down
4 changes: 2 additions & 2 deletions src/jsutils/__tests__/inspect-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ describe('inspect', () => {
expect(inspect({ a: { b: { c: 1 } } })).to.equal('{ a: { b: [Object] } }');

const map = Object.create(null);
map['a'] = true;
map['b'] = null;
map.a = true;
map.b = null;
expect(inspect(map)).to.equal('{ a: true, b: null }');
});

Expand Down