Skip to content

Commit

Permalink
[spell-check] Fixes for a possible patch release (#1173)
Browse files Browse the repository at this point in the history
* [spell-check] Change test so it works identically across platforms

* [spell-check] Remove errant `console.log`…

…and clean up specs.

* [spell-check] Revert addition to `spell-check.grammars`…

…of the `"source comment"` value.

A user can add it back in if they want spell-checking of code comments, but it's probably a bit too opinionated to be the default.
  • Loading branch information
savetheclocktower authored Jan 7, 2025
1 parent e46ba9a commit 316dfd1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
1 change: 0 additions & 1 deletion packages/spell-check/lib/scope-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class ScopeSelector {
enforceSegmentOrder: false,
...rawOptions,
};
console.log(this, 'matches', scopeDescriptorOrArray);
let scopeList;
if (Array.isArray(scopeDescriptorOrArray)) {
scopeList = scopeDescriptorOrArray;
Expand Down
1 change: 0 additions & 1 deletion packages/spell-check/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"grammars": {
"type": "array",
"default": [
"source comment",
"source.asciidoc",
"source.gfm",
"text.git-commit",
Expand Down
17 changes: 10 additions & 7 deletions packages/spell-check/spec/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
module.exports = {
env: { jasmine: true },
rules: {
"node/no-unpublished-require": "off",
"node/no-extraneous-require": "off",
"no-unused-vars": "off",
"no-empty": "off"
}
env: { jasmine: true },
globals: {
advanceClock: true,
},
rules: {
'node/no-unpublished-require': 'off',
'node/no-extraneous-require': 'off',
'no-unused-vars': 'off',
'no-empty': 'off',
},
};
4 changes: 2 additions & 2 deletions packages/spell-check/spec/spell-check-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class SpeledWrong {}`
`speledWrong = 5;
function speledWrong() {}
// We only care about mispelings in comments and strings!
let foo = "this is speled wrong"
let fxo = "this is speled wrong"
class SpeledWrong {}`
);

Expand Down Expand Up @@ -751,6 +751,7 @@ class SpeledWrong {}`
// These tests are only run on Macs because the CI for Windows doesn't have
// spelling provided.
if (env.isSystemSupported() && env.isDarwin()) {
let markers;
describe('when using system checker plugin', function () {
it('marks chzz as not a valid word but cheese is', async function () {
atom.config.set('spell-check.useSystem', true);
Expand All @@ -759,7 +760,6 @@ class SpeledWrong {}`

await conditionPromise(() => {
markers = getMisspellingMarkers();
console.log(markers);
return (
markers.length === 1 &&
markers[0].getBufferRange().start.column === 7 &&
Expand Down

0 comments on commit 316dfd1

Please sign in to comment.