diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 132b04e..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (c) 2022-2023 Zenin Easa Panthakkalakath */ - -module.exports = { - 'env': { - 'browser': true, - 'commonjs': true, - 'es2021': true, - }, - 'extends': [ - 'google', - ], - 'parserOptions': { - 'ecmaVersion': 'latest', - }, - 'rules': { - 'indent': ['error', 4], - 'linebreak-style': 0, - }, -}; diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..0d21757 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,25 @@ +/* Copyright (c) 2022-2024 Zenin Easa Panthakkalakath */ + +const google = require('eslint-config-google'); + +module.exports = [{ + 'files': ['**/*.js'], + 'plugins': { + 'google': google + }, + 'languageOptions': { + 'ecmaVersion': 2022, + 'sourceType': 'module', + }, + 'rules': { + 'indent': ['error', 4], + 'linebreak-style': 0, + 'no-unused-vars': [ + "error", + { + 'args': 'none', + 'caughtErrors': 'none' + } + ] + } +}]; diff --git a/makefile b/makefile index 8db8968..c97618e 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,4 @@ -### Copyright (c) 2022-2023 Zenin Easa Panthakkalakath ### +### Copyright (c) 2022-2024 Zenin Easa Panthakkalakath ### all: make clean @@ -16,11 +16,11 @@ clean: rm -rf node_modules bundle.js package-lock.json out lint: - npx eslint *.js modules/**/*.js test/*.js test/**/*.js + npx eslint --config eslint.config.js npx copyright-header --copyrightHolder "Zenin Easa Panthakkalakath" lintfix: - npx eslint *.js modules/**/*.js test/*.js test/**/*.js --fix + npx eslint --config eslint.config.js --fix npx copyright-header --fix --copyrightHolder "Zenin Easa Panthakkalakath" build-mac-intel: