Skip to content

Commit 708570e

Browse files
committed
Merge branch 'main' into madhur/tree-shaking
2 parents 316f52d + 97e512c commit 708570e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2350
-2527
lines changed

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"@typescript-eslint/no-explicit-any": "off",
5151
"@typescript-eslint/no-unused-vars": "error",
5252
"func-style": ["error", "expression"],
53+
"arrow-body-style": ["error", "as-needed"],
5354
"import/no-extraneous-dependencies": "error"
5455
}
5556
}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ npm-debug.log
2222

2323
# Ignore artifacts
2424
*.tgz
25-
.npmrcpackage-lock.json
25+
.npmrc
26+
package-lock.json

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
],
55
"npmClient": "yarn",
66
"useWorkspaces": true,
7-
"version": "4.12.8"
7+
"version": "4.12.11"
88
}

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@
6666
"lint-staged": {
6767
"./{src,test}/**/*.{ts,js}": [
6868
"eslint -c .eslintrc.json --fix"
69+
],
70+
"packages/*/src/**/*.{ts,js}": [
71+
"eslint -c .eslintrc.json --fix"
72+
],
73+
"packages/*/test/**/*.{ts,js}": [
74+
"eslint -c .eslintrc.json --fix"
6975
]
7076
},
7177
"private": true,

packages/aura-language-server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@salesforce/aura-language-server",
3-
"version": "4.12.8",
3+
"version": "4.12.11",
44
"description": "Language server for Aura components.",
55
"main": "lib/index.js",
66
"module": "lib/index.js",
@@ -66,7 +66,7 @@
6666
"package": "yarn pack"
6767
},
6868
"dependencies": {
69-
"@salesforce/lightning-lsp-common": "4.12.8",
69+
"@salesforce/lightning-lsp-common": "4.12.11",
7070
"acorn-loose": "^6.0.0",
7171
"acorn-walk": "^6.0.0",
7272
"line-column": "^1.0.2",

packages/aura-language-server/src/__tests__/aura-utils.test.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,23 @@ import { TextDocument, Position } from 'vscode-languageserver';
22
import { getAuraBindingValue, parse } from '../aura-utils';
33

44
describe('getAuraBindingValue', () => {
5-
function createDocument(content: string): TextDocument {
6-
return TextDocument.create('file:///test.cmp', 'html', 0, content);
7-
}
5+
const createDocument = (content: string): TextDocument => TextDocument.create('file:///test.cmp', 'html', 0, content);
86

9-
function createPosition(line: number, character: number): Position {
10-
return Position.create(line, character);
11-
}
7+
const createPosition = (line: number, character: number): Position => Position.create(line, character);
128

13-
function getBindingValue(content: string, line: number, character: number): string | null {
9+
const getBindingValue = (content: string, line: number, character: number): string | null => {
1410
const document = createDocument(content);
1511
const htmlDocument = parse(content);
1612
const position = createPosition(line, character);
1713
console.log('position', position);
1814
return getAuraBindingValue(document, position, htmlDocument);
19-
}
15+
};
2016

2117
// simple function to find the cursor position in a string, helpful for readability
22-
function findCursorPosition(content: string): number {
18+
const findCursorPosition = (content: string): number => {
2319
const cursorPosition = content.indexOf('|');
2420
return cursorPosition;
25-
}
21+
};
2622

2723
describe('basic functionality', () => {
2824
it('should extract property from v binding in attribute', () => {

packages/aura-language-server/src/__tests__/package-dependencies.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import glob from 'glob';
99

1010
const checkedPackagePatterns: RegExp[] = [/^@salesforce/i, /^@lwc/i];
1111

12-
function readJsonFile(jsonFilePath: string): any {
12+
const readJsonFile = (jsonFilePath: string): any => {
1313
try {
1414
return JSON.parse(fs.readFileSync(jsonFilePath, 'utf8'));
1515
} catch (e) {
1616
throw new Error(`Error reading json file from ${jsonFilePath}: ${e}`);
1717
}
18-
}
18+
};
1919

2020
const packageJsonPath = path.join(__dirname, '..', '..', 'package.json');
2121
const packageJson = readJsonFile(packageJsonPath);

0 commit comments

Comments
 (0)