Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .eslintrc.js

This file was deleted.

3 changes: 1 addition & 2 deletions bin/sf-docs.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,13 +19,12 @@ const { join } = require('path');
const shell = require('../utils/shelljs');
const packageRoot = require('../utils/package-path');

// eslint-disable-next-line import/order
let options = require('@salesforce/dev-config/typedoc');

try {
const definedOptions = require(`${packageRoot}/typedoc`);
options = Object.assign(options, definedOptions);
} catch (err) {
} catch {
/* do nothing */
}

Expand Down
2 changes: 1 addition & 1 deletion bin/sf-install.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@ const exists = require('../utils/exists');
if (changed) {
const errorHeader = chalk.red('ERROR: ');
const errorMsg = "Dependencies have changed and saved to package.json. Rerun 'yarn install' to finish the install";
// eslint-disable-next-line no-console

console.error(chalk.bold(`\n${errorHeader}${errorMsg}\n`));
process.exit(1);
} else {
Expand Down
5 changes: 1 addition & 4 deletions bin/sf-prepack.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,10 +32,9 @@ if (projectType !== 'other') {
if (projectType !== 'core-plugin') {
const version = shell.exec('oclif --version', { silent: true }).stdout.trim().replace('oclif/', '').split(' ')[0];
if (semverIsLessThan(version, '3.14.0')) {
// eslint-disable-next-line no-console
console.log(
chalk.yellow('Warning:'),
// eslint-disable-next-line max-len

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason these went away? did the lint rules change in an unexpected way as part of this pr? or not get applied to bin or something?


`oclif version ${version} is less than 3.14.0. Please upgrade to 3.14.0 or higher to generate oclif.lock file.`
);
} else {
Expand All@@ -45,11 +44,9 @@ if (projectType !== 'other') {
shell.exec('npm shrinkwrap');
}
} else if (shell.which('oclif-dev')) {
// eslint-disable-next-line no-console
console.log(chalk.yellow('Warning:'), 'oclif-dev is deprecated. Please use oclif instead.');
shell.exec('oclif-dev manifest');
} else {
// eslint-disable-next-line no-console
console.log(chalk.red('Failed:'), 'Cannot generate oclif.manifest.json because oclif is not installed.');
process.exitCode = 1;
}
Expand Down
72 changes: 72 additions & 0 deletions eslint.config.mjs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
/*
* Copyright 2026, Salesforce, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import eslint from '@eslint/js';
import globals from 'globals';
import eslintConfigPrettier from 'eslint-config-prettier';
import headerPlugin from '@tony.ganchev/eslint-plugin-header';

export default [
{
ignores: ['node_modules/**', 'coverage/**'],
},
eslint.configs.recommended,
{
languageOptions: {
ecmaVersion: 2021,
globals: {
...globals.node,
},
},
plugins: {
header: headerPlugin,
},
rules: {
'header/header': [
2,
'block',
[
'',
{
pattern: ' \\* Copyright \\d{4}, Salesforce, Inc\\.',
template: ' * Copyright 2026, Salesforce, Inc.',
},
' *',
' * Licensed under the Apache License, Version 2.0 (the "License");',
' * you may not use this file except in compliance with the License.',
' * You may obtain a copy of the License at',
' *',
' * http://www.apache.org/licenses/LICENSE-2.0',
' *',
' * Unless required by applicable law or agreed to in writing, software',
' * distributed under the License is distributed on an "AS IS" BASIS,',
' * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.',
' * See the License for the specific language governing permissions and',
' * limitations under the License.',
' ',
],
],
},
},
{
files: ['test/**/*.js'],
languageOptions: {
globals: {
...globals.mocha,
},
},
},
eslintConfigPrettier,
];
1 change: 1 addition & 0 deletions files/eslint-strict.config.mjs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
export { default } from 'eslint-config-salesforce-typescript';
1 change: 1 addition & 0 deletions files/eslint.config.mjs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
export { default } from 'eslint-config-salesforce-typescript';
22 changes: 0 additions & 22 deletions files/eslintrc-strict.cjs

This file was deleted.

37 changes: 0 additions & 37 deletions files/eslintrc-test-strict.cjs

This file was deleted.

34 changes: 0 additions & 34 deletions files/eslintrc-test.cjs

This file was deleted.

18 changes: 0 additions & 18 deletions files/eslintrc.cjs

This file was deleted.

36 changes: 25 additions & 11 deletions package.json
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
{
"name": "@salesforce/dev-scripts",
"version": "11.0.4",
"version": "12.0.0",
"description": "Standardize package.json scripts and config files for Salesforce projects.",
"repository": "forcedotcom/dev-scripts",
"bin": {
Expand All@@ -15,7 +15,7 @@
"lint": "eslint \"{files,test,utils,bin}/**/*.js\"",
"clean": "bin/sf-clean.js",
"clean-all": "bin/sf-clean.js all",
"fix-license": "eslint utils files/*.cjs test --fix --rule \"header/header: [2]\"",
"fix-license": "eslint utils files/*.mjs test --fix --rule \"header/header: [2]\"",
"test": "nyc mocha test/**/*.test.js",
"prepare": "husky install"
},
Expand All@@ -28,42 +28,56 @@
"bin",
"utils",
"files",
"sfEslintConfig.mjs",
"sfEslintConfig-strict.mjs",
"sfdevrc.schema.json",
"core-plugins.json",
"jit-plugins.json"
],
"exports": {
"./sfEslintConfig": "./sfEslintConfig.mjs",
"./sfEslintConfig-strict": "./sfEslintConfig-strict.mjs",
"./package.json": "./package.json"
},
"dependencies": {
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"@salesforce/dev-config": "^4.3.3",
"@salesforce/prettier-config": "^0.0.3",
"@types/chai": "^4.3.14",
"@salesforce/prettier-config": "^0.0.4",
"@types/chai": "^4.3.17",
"@types/mocha": "^10.0.10",
"@types/node": "^18",
"@types/sinon": "^10.0.20",
"chai": "^4.3.10",
"chai": "^4.5.0",
"chalk": "^4.0.0",
"cosmiconfig": "^8.3.6",
"eslint-config-salesforce-typescript": "4.0.1",
Comment thread
jfeingold35 marked this conversation as resolved.
"@eslint/js": "^10.0.0",
"@tony.ganchev/eslint-plugin-header": "^3.4.4",
"eslint-config-prettier": "^10.1.5",
"eslint-config-salesforce-typescript": "^6.0.0",
"globals": "^15.14.0",
"husky": "^7.0.4",
"linkinator": "^6.1.2",
"linkinator": "^6.3.0",
"mocha": "^10.8.2",
"nyc": "^17.0.0",
"nyc": "^17.1.0",
"prettier": "^2.8.8",
"pretty-quick": "^3.3.1",
"shelljs": "^0.10.0",
"sinon": "10.0.0",
"source-map-support": "^0.5.21",
"ts-node": "^10.9.2",
"typedoc": "^0.26.5",
"typedoc": "^0.26.11",
"typedoc-plugin-missing-exports": "^3.1.0",
"typescript": "^5.5.4",
"typescript": "^5.5.4 || ^6",
"wireit": "^0.14.13"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"eslint": "^8.57.1"
"eslint": "^10.4.0"
},
"overrides": {
"browserslist": "4.24.0"
}
}
1 change: 1 addition & 0 deletions sfEslintConfig-strict.mjs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
export { default } from 'eslint-config-salesforce-typescript';
1 change: 1 addition & 0 deletions sfEslintConfig.mjs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
export { default } from 'eslint-config-salesforce-typescript';
21 changes: 0 additions & 21 deletions test/.eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion utils/exists.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ module.exports = (path) => {
try {
accessSync(path);
return true;
} catch (err) {
} catch {
/* do nothing */
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion utils/husky-init.js
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,7 +38,7 @@ function initializeHusky() {
if (err.code === 'ENOENT') {
const errorHeader = chalk.red('ERROR: ');
const errorMsg = ".husky folder wasn't found, try running `yarn husky install` to finish the install";
// eslint-disable-next-line no-console

console.error(chalk.bold(`\n${errorHeader}${errorMsg}\n`));
process.exit(1);
}
Expand Down
Loading
Loading