Skip to content

Commit ddc81fe

Browse files
committed
Add eslint
1 parent f37995c commit ddc81fe

File tree

6 files changed

+2163
-12
lines changed

6 files changed

+2163
-12
lines changed

.eslintrc.json

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
// JS Files
3+
"root": true,
4+
"env": {
5+
"atomtest": true,
6+
"es6": true,
7+
"node": true,
8+
"browser": true
9+
},
10+
"globals": { "atom": "writable" },
11+
"parser": "babel-eslint",
12+
"parserOptions": {
13+
"ecmaFeatures": { "jsx": true },
14+
"ecmaVersion": 2018,
15+
"sourceType": "module"
16+
},
17+
"plugins": ["only-warn"],
18+
"extends": ["eslint:recommended"],
19+
"overrides": [
20+
{ // Bundled node version with atom has an old ESLint
21+
// TypeScript files
22+
"files": ["**/*.ts", "**/*.tsx"],
23+
"env": {
24+
"atomtest": true,
25+
"es6": true,
26+
"node": true,
27+
"browser": true
28+
},
29+
"globals": { "atom": "writable" },
30+
"parser": "@typescript-eslint/parser",
31+
"parserOptions": {
32+
"ecmaFeatures": { "jsx": true },
33+
"ecmaVersion": 2018,
34+
"sourceType": "module"
35+
},
36+
"plugins": ["@typescript-eslint", "only-warn"],
37+
"extends": [
38+
"eslint:recommended",
39+
"plugin:@typescript-eslint/eslint-recommended",
40+
"plugin:@typescript-eslint/recommended"
41+
],
42+
"rules": {
43+
"@typescript-eslint/explicit-function-return-type": "off",
44+
"@typescript-eslint/camelcase": "off",
45+
"@typescript-eslint/no-use-before-define": "off",
46+
"@typescript-eslint/member-delimiter-style": "off"
47+
}
48+
},
49+
{
50+
// CoffeeScript files
51+
"files": ["**/*.coffee"],
52+
"env": {
53+
"atomtest": true,
54+
"es6": true,
55+
"node": true,
56+
"browser": true
57+
},
58+
"globals": { "atom": "writable" },
59+
// "parser": "eslint-plugin-coffee",
60+
"parser": "eslint-plugin-coffee",
61+
"parserOptions": {
62+
"ecmaFeatures": { "jsx": true },
63+
"ecmaVersion": 2018,
64+
"sourceType": "module"
65+
},
66+
"plugins": ["coffee", "only-warn"],
67+
"extends": ["plugin:coffee/eslint-recommended"]
68+
}
69+
]
70+
}

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ julia:
77
env:
88
global:
99
- APM_TEST_PACKAGES="ink language-julia"
10-
- ATOM_LINT_WITH_BUNDLED_NODE="true"
10+
- ATOM_LINT_WITH_BUNDLED_NODE="false" # script is used instead
1111

1212
matrix:
1313
- ""
@@ -26,6 +26,7 @@ matrix:
2626
- os: linux
2727
julia: 1.3
2828
env: ATOM_CHANNEL=beta
29+
2930
allow_failures:
3031
- julia: nightly
3132
- env: ATOM_CHANNEL=beta
@@ -35,6 +36,7 @@ script:
3536
- curl -s -O https://raw.githubusercontent.com/atom/ci/master/build-package.sh
3637
- chmod u+x build-package.sh
3738
- ./build-package.sh
39+
- npm run lint
3840

3941
dist: xenial
4042
addons:

appveyor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### Project specific config ###
22
environment:
33
APM_TEST_PACKAGES: "ink language-julia"
4-
ATOM_LINT_WITH_BUNDLED_NODE: "true"
4+
ATOM_LINT_WITH_BUNDLED_NODE: "false" # build_script is used instead
55

66
matrix:
77
- ATOM_CHANNEL: stable
@@ -11,6 +11,7 @@ environment:
1111
build_script:
1212
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/atom/ci/master/build-package.ps1'))
1313
- julia: ci/packages.jl
14+
- ps: npm run lint
1415

1516
branches:
1617
only:

lib_src/tslint.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
"semicolon": false,
1414
"whitespace": false,
15+
"no-trailing-whitespace": false,
1516
"curly": false,
1617
"variable-name": false,
1718
"arrow-parens": false,

0 commit comments

Comments
 (0)