Commit graph

50 commits

Author SHA1 Message Date
David Sanders
27ddf19f3c
chore: use pylint-2.7 (#33232)
* chore: use pylint-2.7

* chore: fix pylint errors
2022-03-22 20:17:35 -04:00
Milan Burda
9d054755d6
refactor: implement ajax() in tests using native fetch instead of jQuery (#32579) 2022-01-24 10:34:23 +01:00
Milan Burda
c4ea33d1bf
chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
Milan Burda
7ff15038d6
fix: lint Objective-C header files (#31923) 2021-11-22 09:36:32 +09:00
Cheng Zhao
c4d35cd18c
fix: do not run dialog callback inside transaction commit (#31606) 2021-11-01 17:08:31 -04:00
Juan Cruz Viotti
1193a37d8f
build: Explicitly pass the project root to cpplint.py (#31156)
In order to validate that header guards match the corresponding file
names, `cpplint.py` determines the root of the project based on the
presence of a `.git` directory.

For space reasons, our Electron.js fork running on CircleCI deletes the
`.git` directories as upstream Electron.js does here:

cd09a54365/.circleci/config.yml (L426)

If the C++ linter is ran *after* deleting git directories, `cpplint.py`
gets the root wrong and throws errors for every single header guard in
the project.

Making sure we run the C++ linter *before* deleting git directories
fixes the issue. In any case, this commit always manually passes
`--project_root` to `cpplint.py` so that the implicit default is
explicitly declared and saves some confusion for the next person hitting
this.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2021-09-29 17:44:41 -04:00
Alexey Kuzmin
2d111a4e25
chore: fix pylint (#31138)
* chore: fix pylint

* chore: fix linter errors
2021-09-29 13:10:13 -04:00
Samuel Attard
9236e56ddc
build: provide line numbers of bad patch lines when linting (#28666) 2021-04-15 10:43:35 -07:00
Samuel Maddock
b9b734c9c4
fix: export patches not retaining CRLF line endings (#28360)
When a patch targets a file using CRLF line endings, they need to be
retained in the patch file. Otherwise the patch will fail to apply
due to being unable to find surrounding lines with matching whitespace.
2021-03-25 14:49:53 +09:00
Samuel Attard
51db2a6b34
build: fix JS linting (#26876) 2020-12-10 10:57:06 -08:00
David Sanders
61f339d3aa
chore: use ESLint API for linting (#26705)
* chore: use ESLint API for linting

* chore: fix typo

* chore: fix import
2020-12-01 10:47:29 +09:00
David Sanders
c8c41fb727
chore: fixup patches linting (#26595) 2020-11-30 16:49:01 +09:00
David Sanders
35455c725d
build: fix running eslint on Windows (#26014) 2020-10-21 15:44:38 -07:00
David Sanders
2aa5a1f494
build: lint the npm folder (#26085) 2020-10-21 15:43:52 -07:00
David Sanders
042ebdd5b0
build: lint patches for trailing whitespace (#26007) 2020-10-20 10:40:58 +09:00
David Sanders
64504536fa
build: fix invocation of cpplint on Windows (#26011) 2020-10-19 12:08:13 -07:00
Samuel Attard
cbb47570bd
build: run the JS linter on the build folder (#24513) 2020-07-10 14:48:50 -07:00
Jeremy Rose
d08cfce6cb
chore: use more inclusive language in a few places (#24023)
* chore: use more inclusive language in lint script

* whitelist -> allowed_extension_ids in plugin_utils

* some other places
2020-06-09 11:29:29 -07:00
Samuel Attard
b03bd8c45c
chore: rename atom things to electron things in our docs / scripts (#23100) 2020-04-13 14:32:29 -07:00
Samuel Attard
5d657dece4
build: enable JS semicolons (#22783) 2020-03-20 13:28:31 -07:00
Samuel Attard
b87b501161
build: update eslint + eslint plugins (#22777)
* build: run eslint --fix

* chore: manually fix all hasOwnProperty errors

* chore: manually fix all void 0 vs undefined errors

* chore: manually fix all async-in-promise errors

* chore: manually fix lexical declaration in case block
2020-03-20 11:12:18 -04:00
Jeremy Apthorp
d9321f4df7
chore: rename atom -> electron (#21986) 2020-02-04 12:19:40 -08:00
Alexey Kuzmin
bc0f5acc73
chore: fix linter errors in .mm files (#21931)
* chore: fix the "npm run lint:obj" invocation

* chore: fix linter errors in .mm files
2020-01-29 17:03:53 +00:00
Jeremy Apthorp
a90b5f8421
chore: fix patch linter (#21495) 2019-12-13 09:18:45 -08:00
Cheng Zhao
0a741670a9
chore: remove native_mate (Part 14) (#21365)
* chore: remove uses of mate::Dictionary and mate::Handle

* chore: move CreateConstructor to gin_helper

* chore: remove native_mate

* chore: remove unneeded gin patch
2019-12-05 18:46:34 +09:00
Jeremy Apthorp
4de04da27a
chore: lint patch descriptions (#20919) 2019-11-04 11:04:18 -08:00
Jeremy Apthorp
ecd9e1f26e
chore: lint spec-main (#20835) 2019-11-01 13:37:02 -07:00
Cheng Zhao
2c23e44ed9
chore: remove native_mate (Part 3) (#20131)
* use gin converter in atom_api_menu

* please only put necessary includes in header

Having include in header means they have dependency relationship,
putting arbitrary includes really really really really really makes
refacoring much harder.

* remove some simple uses of callback_converter_deprecated.h

* use gin callback converter in file_dialog code

* use gin in ErrorThrower

* use gin in atom_bundle_mover

* fix mistake in node stream

* deprecate native_mate version of event_emitter_caller

* use gin in node_bindings

* remove usages of native_mate event_emitter_caller.h except for EventEmitter

* fix compilation on Windows

* gin::Arguments behaves differently on GetNext

* just use StringToV8
2019-09-06 14:52:54 +09:00
Milan Burda
4639c68a7b chore: remove no longer needed macOS SDK forward declarations (#19446) 2019-07-26 14:11:37 +02:00
Samuel Attard
56930338e8 chore: fix linting after shell rename 2019-06-19 17:33:28 -07:00
Samuel Attard
00d18917d0
build: add basic linting for the patches folder to ensure that .patches match the state on disk (#18615) 2019-06-19 10:48:15 -07:00
Jeremy Apthorp
ba96cdb7dc
refactor: mojofy autofill (#18723) 2019-06-12 15:08:22 -07:00
Milan Burda
9585818a90 chore: add clang-format and limited linting for Objective-C sources (#18104) 2019-05-02 21:05:37 +09:00
Milan Burda
8785e9007c chore: add native_mate to lint:cpp (#18100) 2019-05-02 11:45:23 +09:00
Samuel Attard
98c51dd660
build: ensure consistent lock files across multiple machines (#17955)
* build: ensure consistent package-lock across multiple machines

* build: fix linting errors and use npm ci instead of npm install

* build: use a yarn.lock and yarn instead of package-lock and npm

* chore: replace package-lock.json files with yarn.lock

* chore: replace last instance of `npm install`
2019-04-30 13:59:47 -07:00
Shelley Vohr
319c2853df chore: move ts-smoke tests to core (#16930)
* chore: move ts smoke tests to core

* fix: fix paths for tsconfig / ts-smoke runner

* update ts-defs version

* do not lintr
2019-02-13 15:24:28 -08:00
Samuel Attard
26df9992cf
build: use typescript for internal Electron JS code (#16441) 2019-02-06 10:27:20 -08:00
Samuel Attard
0b0679e065
build: auto-fix linting issues on commit (#16466)
* build: auto-fix formatting during commit

* use lint-staged as precommit hook to autofix issues
2019-01-21 14:46:32 -08:00
Jeremy Apthorp
98d0daa2fd
chore: remove unused osfhandle hack (#16305) 2019-01-17 15:58:47 -08:00
Cheng Zhao
6fa940f2c1 chore: set env when invoking gn (#15354) 2018-10-24 11:25:13 -07:00
Milan Burda
8ba271efba refactor: eliminate brightray (#15240) 2018-10-24 12:49:10 +02:00
Milan Burda
6f3c46cc7e refactor: move devtools from brightray to atom (#15234) 2018-10-19 15:50:30 +02:00
Milan Burda
a369a4172b refactor: move notifications from brightray to atom (#15209) 2018-10-17 20:01:11 +02:00
Jeremy Apthorp
2a4f5c3284 chore: add --fix option to lint:cpp (#14977)
* chore: add --fix option to lint:cpp

* fix lint errors
2018-10-15 22:59:45 -07:00
Heilig Benedek
4017f3faa7 fix: make lint run on Windows in PowerShell 2018-10-09 14:38:00 -07:00
Jeremy Apthorp
14fc6f3081 chore: add GN linting (#14678)
* chore: add GN linter

* chore: fix GN lint errors

* try some crazy bash to get a gn exe

* base64 on linux is different

* cloning build_tools doesn't download GN

* download_from_google_storage needs depot_tools in the path

* fixup! chore: add GN linter
2018-10-03 18:03:26 -05:00
Samuel Attard
82a5a9f455
chore: ignore spec/node_modules from linting (#14717) 2018-09-20 15:41:01 +10:00
Charles Kerr
03553abc11 feat: use run-clang-format in cc --fix mode 2018-09-19 08:42:03 -05:00
Charles Kerr
1988c6876d refactor: use same diff args as run-clang-format 2018-09-19 08:40:57 -05:00
Charles Kerr
eeeeae3bff
refactor: use one script to launch all linters (#14622)
* refactor: use one script to launch py, js, cc linters

* lint changed files as precommit hook

* fix py linter in GN build

* add overlooked files to linter search path
2018-09-17 16:09:02 -05:00