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
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

17 changes: 0 additions & 17 deletions .eslintrc

This file was deleted.

38 changes: 38 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import {defineConfig, globalIgnores} from 'eslint/config';
import tseslint from 'typescript-eslint';
import gts from 'gts';

export default defineConfig([
globalIgnores([
'**/build/',
'**/dist/',
'**/language/',
'**/_types/',
'lib/src/vendor/',
'**/*.js',
]),
{
extends: [tseslint.configs.recommended, gts],

rules: {
'@typescript-eslint/explicit-function-return-type': [
'error',
{allowExpressions: true},
],
'n/no-extraneous-require': ['error', {allowModules: ['sass']}],
'func-style': ['error', 'declaration'],
'prefer-const': ['error', {destructuring: 'all'}],
'sort-imports': ['error', {ignoreDeclarationSort: true}],
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'none',
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
},
},
]);
2 changes: 1 addition & 1 deletion lib/src/compiler/async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class AsyncCompiler {
}

/** Initialize resources shared across compilations. */
constructor(flag: Symbol | undefined) {
constructor(flag: symbol | undefined) {
if (flag !== initFlag) {
throw utils.compilerError(
'AsyncCompiler can not be directly constructed. ' +
Expand Down
2 changes: 1 addition & 1 deletion lib/src/compiler/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class Compiler {
}

/** Initialize resources shared across compilations. */
constructor(flag: Symbol | undefined) {
constructor(flag: symbol | undefined) {
if (flag !== initFlag) {
throw utils.compilerError(
'Compiler can not be directly constructed. ' +
Expand Down
2 changes: 1 addition & 1 deletion lib/src/deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function getDeprecationIds(
* This is used to determine which options to use when handling host-side
* deprecation warnings that aren't explicitly tied to a particular compilation.
*/
export const activeDeprecationOptions: Map<Symbol, DeprecationOptions> =
export const activeDeprecationOptions: Map<symbol, DeprecationOptions> =
new Map();

/**
Expand Down
6 changes: 3 additions & 3 deletions lib/src/legacy/importer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ interface PreviousUrl {
* A wrapper around a `LegacyImporter` callback that exposes it as a new-API
* `Importer`.
*/
export class LegacyImporterWrapper<sync extends 'sync' | 'async'>
implements Importer<sync>
{
export class LegacyImporterWrapper<
sync extends 'sync' | 'async',
> implements Importer<sync> {
// A stack of previous URLs passed to `this.callbacks`.
private readonly prev: PreviousUrl[] = [];

Expand Down
2 changes: 1 addition & 1 deletion lib/src/protofier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class Protofier {
/** Converts a CalculationValue that appears within a `SassCalculation` to
* its protocol buffer representation. */
private protofyCalculationValue(
value: Object,
value: object,
): proto.Value_Calculation_CalculationValue {
const result = create(proto.Value_Calculation_CalculationValueSchema, {});
if (value instanceof SassCalculation) {
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
"devDependencies": {
"@bufbuild/buf": "^1.54.0",
"@bufbuild/protoc-gen-es": "^2.5.0",
"@eslint/eslintrc": "^3.3.3",
"@eslint/js": "^9.39.2",
"@types/buffer-builder": "^0.2.0",
"@types/google-protobuf": "^3.7.2",
"@types/jest": "^30.0.0",
Expand All @@ -83,7 +85,7 @@
"@types/varint": "^6.0.1",
"@types/yargs": "^17.0.4",
"extract-zip": "^2.0.1",
"gts": "^6.0.2",
"gts": "^7.0.0",
"jest": "^30.0.3",
"npm-run-all": "^4.1.5",
"shelljs": "^0.10.0",
Expand Down