add eslint

This commit is contained in:
Jonas Heinrich 2024-08-28 12:40:11 +02:00
parent cdac7ad5fc
commit 88b79bb78f
5 changed files with 17076 additions and 14 deletions

52
flake.lock generated
View file

@ -1,12 +1,28 @@
{ {
"nodes": { "nodes": {
"eslint": {
"locked": {
"lastModified": 1724837771,
"narHash": "sha256-5j1sZjDSnrNqrVy7rR92tl5PByvKxc2NMSI7CMXk17g=",
"owner": "onny",
"repo": "nixpkgs",
"rev": "11f8b6c9852ccc560f63e659286e27ce3162bcb3",
"type": "github"
},
"original": {
"owner": "onny",
"ref": "eslint",
"repo": "nixpkgs",
"type": "github"
}
},
"keycloak-realms": { "keycloak-realms": {
"locked": { "locked": {
"lastModified": 1721493163, "lastModified": 1721562747,
"narHash": "sha256-VmHIhv0VKcpL4IhP8kc5gIeIZNMS4Df9yHlPVc7LAlg=", "narHash": "sha256-uHNWpe/j5Q7Ak9+SNQkCPy7t9ayQUDAt+2tZ7OFYv6Q=",
"owner": "rorosen", "owner": "rorosen",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "162639ea7c3ac6578e77698ce71c2b1dc49ceffd", "rev": "79862894befe49e2837e3f5eefe11433eef6611a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -16,16 +32,32 @@
"type": "github" "type": "github"
} }
}, },
"licensedigger": {
"locked": {
"lastModified": 1724834768,
"narHash": "sha256-VXI8rKoDiq+YQxUOt+AQ2NgS+BoneS/z2NVa0+EZztU=",
"owner": "onny",
"repo": "nixpkgs",
"rev": "711ae571d2d4f63dd3a02feefb97c4fecf6840a3",
"type": "github"
},
"original": {
"owner": "onny",
"ref": "licensedigger",
"repo": "nixpkgs",
"type": "github"
}
},
"nixos-shell": { "nixos-shell": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1711263551, "lastModified": 1723616342,
"narHash": "sha256-lDaSa0yT0uzFXq1rB0DbD5MNi2TmG9DaTrZqZoPP/I4=", "narHash": "sha256-plRKXQqww7easx0wgGKAkOJH1TW/PeeB20dq9XUN8J4=",
"owner": "Mic92", "owner": "Mic92",
"repo": "nixos-shell", "repo": "nixos-shell",
"rev": "b7e8a0c75c99d81039d1ca7eaab227e4814de638", "rev": "93e314cdd16d4c3e3baf25b54734461c45a5d1ad",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -51,11 +83,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1721471800, "lastModified": 1724830280,
"narHash": "sha256-+qIOk9CTI7yFtXJ6WU3OxLS5N9RUP57wiZ4aG9WJAxk=", "narHash": "sha256-+gOB/YVMvgUU9C46APzTN5BgN6zetHyQNzJ9e1FnEJo=",
"owner": "onny", "owner": "onny",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1ab2b701851fdddd2480ca5a472a2f8e4a68a805", "rev": "1ae627bb9595f0c761275d2755ec34a4d8709bc2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -67,7 +99,9 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"eslint": "eslint",
"keycloak-realms": "keycloak-realms", "keycloak-realms": "keycloak-realms",
"licensedigger": "licensedigger",
"nixos-shell": "nixos-shell", "nixos-shell": "nixos-shell",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
} }

View file

@ -7,6 +7,9 @@
nixpkgs.url = "github:onny/nixpkgs/hmr-enabler"; nixpkgs.url = "github:onny/nixpkgs/hmr-enabler";
nixos-shell.url = "github:Mic92/nixos-shell"; nixos-shell.url = "github:Mic92/nixos-shell";
keycloak-realms.url = "github:rorosen/nixpkgs/keycloak-realm-import"; keycloak-realms.url = "github:rorosen/nixpkgs/keycloak-realm-import";
# FIXME
licensedigger.url = "github:onny/nixpkgs/licensedigger";
eslint.url = "github:onny/nixpkgs/eslint";
}; };
outputs = { self, nixpkgs, nixos-shell, ... }@inputs: let outputs = { self, nixpkgs, nixos-shell, ... }@inputs: let
@ -24,19 +27,44 @@
specialArgs.inputs = inputs; specialArgs.inputs = inputs;
modules = [ modules = [
(import ./vm-nextcloud.nix) (import ./vm-nextcloud.nix)
nixos-shell.nixosModules.nixos-shell
]; ];
}; };
devShells.x86_64-linux = { devShells.x86_64-linux = {
default = with pkgs; mkShell { default = with pkgs; mkShell {
nativeBuildInputs = [ nativeBuildInputs = with nodePackages; [
php83Packages.composer php84Packages.composer
phpunit phpunit
nodejs nodejs
nodePackages.rollup rollup
act act
npm-check-updates npm-check-updates
# FIXME
inputs.licensedigger.legacyPackages.x86_64-linux.licensedigger
(inputs.eslint.legacyPackages.x86_64-linux.eslint.overrideAttrs (oldAttrs: rec {
version = "8.57.0";
src = fetchFromGitHub {
owner = "eslint";
repo = "eslint";
rev = "refs/tags/v${version}";
hash = "sha256-nXlS+k8FiN7rbxhMmRPb3OplHpl+8fWdn1nY0cjL75c=";
};
postPatch = ''
cp ${./package-lock.json} package-lock.json
'';
npmDepsHash = "sha256-DiXgAD0PvIIBxPAsdU8OOJIyvYI0JyPqu6sj7XN94hE=";
npmDeps = pkgs.fetchNpmDeps {
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./package-lock.json
./package.json
];
};
name = "eslint-${version}-npm-deps";
hash = npmDepsHash;
};
}))
]; ];
}; };
}; };

16819
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

179
package.json Normal file
View file

@ -0,0 +1,179 @@
{
"name": "eslint",
"version": "8.57.0",
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
"description": "An AST-based pattern checker for JavaScript.",
"bin": {
"eslint": "./bin/eslint.js"
},
"main": "./lib/api.js",
"exports": {
"./package.json": "./package.json",
".": "./lib/api.js",
"./use-at-your-own-risk": "./lib/unsupported-api.js"
},
"scripts": {
"build:docs:update-links": "node tools/fetch-docs-links.js",
"build:site": "node Makefile.js gensite",
"build:webpack": "node Makefile.js webpack",
"build:readme": "node tools/update-readme.js",
"lint": "node Makefile.js lint",
"lint:docs:js": "node Makefile.js lintDocsJS",
"lint:docs:rule-examples": "node Makefile.js checkRuleExamples",
"lint:fix": "node Makefile.js lint -- fix",
"lint:fix:docs:js": "node Makefile.js lintDocsJS -- fix",
"release:generate:alpha": "node Makefile.js generatePrerelease -- alpha",
"release:generate:beta": "node Makefile.js generatePrerelease -- beta",
"release:generate:latest": "node Makefile.js generateRelease",
"release:generate:rc": "node Makefile.js generatePrerelease -- rc",
"release:publish": "node Makefile.js publishRelease",
"test": "node Makefile.js test",
"test:cli": "mocha",
"test:fuzz": "node Makefile.js fuzz",
"test:performance": "node Makefile.js perf"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.js": "eslint --fix",
"*.md": "markdownlint --fix",
"lib/rules/*.js": [
"node tools/update-eslint-all.js",
"git add packages/js/src/configs/eslint-all.js"
],
"docs/src/rules/*.md": [
"node tools/check-rule-examples.js",
"node tools/fetch-docs-links.js",
"git add docs/src/_data/further_reading_links.json"
],
"docs/**/*.svg": "npx svgo -r --multipass"
},
"files": [
"LICENSE",
"README.md",
"bin",
"conf",
"lib",
"messages"
],
"repository": "eslint/eslint",
"funding": "https://opencollective.com/eslint",
"homepage": "https://eslint.org",
"bugs": "https://github.com/eslint/eslint/issues/",
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^2.1.4",
"@eslint/js": "8.57.0",
"@humanwhocodes/config-array": "^0.11.14",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
"@ungap/structured-clone": "^1.2.0",
"ajv": "^6.12.4",
"chalk": "^4.0.0",
"cross-spawn": "^7.0.2",
"debug": "^4.3.2",
"doctrine": "^3.0.0",
"escape-string-regexp": "^4.0.0",
"eslint-scope": "^7.2.2",
"eslint-visitor-keys": "^3.4.3",
"espree": "^9.6.1",
"esquery": "^1.4.2",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
"file-entry-cache": "^6.0.1",
"find-up": "^5.0.0",
"glob-parent": "^6.0.2",
"globals": "^13.19.0",
"graphemer": "^1.4.0",
"ignore": "^5.2.0",
"imurmurhash": "^0.1.4",
"is-glob": "^4.0.0",
"is-path-inside": "^3.0.3",
"js-yaml": "^4.1.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.4.1",
"lodash.merge": "^4.6.2",
"minimatch": "^3.1.2",
"natural-compare": "^1.4.0",
"optionator": "^0.9.3",
"strip-ansi": "^6.0.1",
"text-table": "^0.2.0"
},
"devDependencies": {
"@babel/core": "^7.4.3",
"@babel/preset-env": "^7.4.3",
"@wdio/browser-runner": "^8.14.6",
"@wdio/cli": "^8.14.6",
"@wdio/concise-reporter": "^8.14.0",
"@wdio/globals": "^8.14.6",
"@wdio/mocha-framework": "^8.14.0",
"babel-loader": "^8.0.5",
"c8": "^7.12.0",
"chai": "^4.0.1",
"cheerio": "^0.22.0",
"common-tags": "^1.8.0",
"core-js": "^3.1.3",
"ejs": "^3.0.2",
"eslint": "file:.",
"eslint-config-eslint": "file:packages/eslint-config-eslint",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-eslint-plugin": "^5.2.1",
"eslint-plugin-internal-rules": "file:tools/internal-rules",
"eslint-plugin-jsdoc": "^46.2.5",
"eslint-plugin-n": "^16.6.0",
"eslint-plugin-unicorn": "^49.0.0",
"eslint-release": "^3.2.0",
"eslump": "^3.0.0",
"esprima": "^4.0.1",
"fast-glob": "^3.2.11",
"fs-teardown": "^0.1.3",
"glob": "^7.1.6",
"got": "^11.8.3",
"gray-matter": "^4.0.3",
"lint-staged": "^11.0.0",
"load-perf": "^0.2.0",
"markdown-it": "^12.2.0",
"markdown-it-container": "^3.0.0",
"markdownlint": "^0.32.0",
"markdownlint-cli": "^0.37.0",
"marked": "^4.0.8",
"memfs": "^3.0.1",
"metascraper": "^5.25.7",
"metascraper-description": "^5.25.7",
"metascraper-image": "^5.29.3",
"metascraper-logo": "^5.25.7",
"metascraper-logo-favicon": "^5.25.7",
"metascraper-title": "^5.25.7",
"mocha": "^8.3.2",
"mocha-junit-reporter": "^2.0.0",
"node-polyfill-webpack-plugin": "^1.0.3",
"npm-license": "^0.3.3",
"pirates": "^4.0.5",
"progress": "^2.0.3",
"proxyquire": "^2.0.1",
"recast": "^0.23.0",
"regenerator-runtime": "^0.14.0",
"rollup-plugin-node-polyfills": "^0.2.1",
"semver": "^7.5.3",
"shelljs": "^0.8.2",
"sinon": "^11.0.0",
"vite-plugin-commonjs": "^0.10.0",
"webdriverio": "^8.14.6",
"webpack": "^5.23.0",
"webpack-cli": "^4.5.0",
"yorkie": "^2.0.0"
},
"keywords": [
"ast",
"lint",
"javascript",
"ecmascript",
"espree"
],
"license": "MIT",
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
}

View file

@ -230,7 +230,9 @@
hostname-strict-https = false; hostname-strict-https = false;
}; };
database.passwordFile = "${pkgs.writeText "dbPassword" ''test123''}"; database.passwordFile = "${pkgs.writeText "dbPassword" ''test123''}";
realmFiles.OIDCDemo = builtins.toJSON realm; realmFiles = [
(pkgs.writeText "OIDCDemo.json" (builtins.toJSON realm))
];
}; };
system.stateVersion = "24.05"; system.stateVersion = "24.05";