Skip to content

Commit ea56772

Browse files
authored
Merge pull request #11 from khawkins/cleanup
Cleanup
2 parents e772542 + 4715400 commit ea56772

File tree

8 files changed

+56
-13
lines changed

8 files changed

+56
-13
lines changed

.eslintrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
"overrides": [
88
{
99
"files": ["lib/rules/*.{js,ts}"],
10-
"extends": ["plugin:eslint-plugin/rules-recommended"]
10+
"extends": ["plugin:eslint-plugin/rules-recommended"],
11+
"rules": {
12+
"eslint-plugin/prefer-message-ids": "off" // Messages come straight from Komaci.
13+
}
1114
}
1215
],
1316
"env": {

.github/workflows/lint.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: lint
2+
run-name: Installs project and runs linting
3+
on: [ push, pull_request ]
4+
jobs:
5+
lint:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
node: [ 16, 18 ]
10+
name: Linting on Ubuntu with Node ${{ matrix.node }}
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: ${{ matrix.node }}
16+
cache: 'npm'
17+
- run: yarn install
18+
- run: yarn lint

.github/workflows/prettier.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: prettier
2+
run-name: Installs project and runs prettier checks
3+
on: [ push, pull_request ]
4+
jobs:
5+
lint:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
node: [ 16, 18 ]
10+
name: Prettier on Ubuntu with Node ${{ matrix.node }}
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: ${{ matrix.node }}
16+
cache: 'npm'
17+
- run: yarn install
18+
- run: yarn format

lib/configs/recommended.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@ module.exports = {
3131
'@salesforce/lwc-graph-analyzer/no-wire-config-property-uses-imported-artifact-from-unsupported-namespace':
3232
'warn',
3333
'@salesforce/lwc-graph-analyzer/no-wire-adapter-of-resource-cannot-be-primed': 'warn',
34-
'@salesforce/lwc-graph-analyzer/no-unsupported-member-variable-in-member-expression': 'warn',
34+
'@salesforce/lwc-graph-analyzer/no-unsupported-member-variable-in-member-expression':
35+
'warn',
3536
'@salesforce/lwc-graph-analyzer/no-multiple-template-files': 'warn',
36-
'@salesforce/lwc-graph-analyzer/no-conditional-using-unanalyzable-non-public-property': 'warn',
37+
'@salesforce/lwc-graph-analyzer/no-conditional-using-unanalyzable-non-public-property':
38+
'warn',
3739
'@salesforce/lwc-graph-analyzer/no-conditional-on-unanalyzable-getter-property': 'warn',
38-
'@salesforce/lwc-graph-analyzer/no-conditional-using-property-from-unresolvable-wire': 'warn',
40+
'@salesforce/lwc-graph-analyzer/no-conditional-using-property-from-unresolvable-wire':
41+
'warn',
3942
'@salesforce/lwc-graph-analyzer/no-image-reference-unanalyzable-source-property': 'warn',
4043
'@salesforce/lwc-graph-analyzer/no-image-reference-missing-source-property': 'warn',
4144
'@salesforce/lwc-graph-analyzer/no-iterate-on-unanalyzable-getter-property': 'warn',
@@ -51,7 +54,8 @@ module.exports = {
5154
'@salesforce/lwc-graph-analyzer/no-tagged-template-expression-contains-unsupported-namespace':
5255
'warn',
5356
'@salesforce/lwc-graph-analyzer/no-expression-contains-module-level-variable-ref': 'warn',
54-
'@salesforce/lwc-graph-analyzer/no-call-expression-references-unsupported-namespace': 'warn',
57+
'@salesforce/lwc-graph-analyzer/no-call-expression-references-unsupported-namespace':
58+
'warn',
5559
'@salesforce/lwc-graph-analyzer/no-eval-usage': 'warn',
5660
'@salesforce/lwc-graph-analyzer/no-reference-to-class-functions': 'warn',
5761
'@salesforce/lwc-graph-analyzer/no-reference-to-module-functions': 'warn',
@@ -60,8 +64,10 @@ module.exports = {
6064
'warn',
6165
'@salesforce/lwc-graph-analyzer/no-member-expression-reference-to-unsupported-namespace-reference':
6266
'warn',
63-
'@salesforce/lwc-graph-analyzer/no-member-expression-contains-non-portable-identifier': 'warn',
67+
'@salesforce/lwc-graph-analyzer/no-member-expression-contains-non-portable-identifier':
68+
'warn',
6469
'@salesforce/lwc-graph-analyzer/no-member-expression-reference-to-super-class': 'warn',
65-
'@salesforce/lwc-graph-analyzer/no-member-expression-reference-to-unsupported-global': 'warn'
70+
'@salesforce/lwc-graph-analyzer/no-member-expression-reference-to-unsupported-global':
71+
'warn'
6672
}
67-
};
73+
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
"@babel/core": "^7.20.2"
6767
},
6868
"scripts": {
69-
"format": "prettier --write \"**/*.{js,json,md}\"",
69+
"format": "prettier --list-different \"**/*.js\"",
70+
"format:fix": "prettier --write \"**/*.{js,json}\"",
7071
"lint": "eslint lib test",
7172
"test": "yarn jest --coverage"
7273
},

test/lib/rules/artifacts-combined-files/unresolvableChildComponent/primingDiagnostic.json

Whitespace-only changes.

test/lib/rules/artifacts-combined-files/unresolvedIteratorGetter/no-composition-on-unanalyzable-getter-property.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77

88
'use strict';
99

10-
//no-composition-on-unanalyzable-getter-property
11-
//no-assignment-expression-assigns-value-to-member-variable
12-
1310
const { assert } = require('chai');
1411
const { lintBundle } = require('../helper');
1512

test/lib/rules/no-call-expression-references-unsupported-namespace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ ruleTester.run(
5252
filename: 'lwc-code.js', // Komaci needs a fake filename to be provided from RuleTester or otherwise it fails to run
5353
errors: [
5454
{
55-
message: `Call expression contains reference to an unsupported namespace \'testFunction\'`
55+
message: `Call expression contains reference to an unsupported namespace 'testFunction'`
5656
}
5757
]
5858
}

0 commit comments

Comments
 (0)